ip_tunnel: Do not use stale inner_iph pointer.
authorPravin B Shelar <pshelar@nicira.com>
Wed, 25 Sep 2013 16:57:47 +0000 (09:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2013 01:14:26 +0000 (18:14 -0700)
commit55f08149b0ebdd3ed44f9b361829ca924c35e3a8
tree0e4e73380624d1393440cc3de59e71106b9d3bd1
parent1d9aa1c2278f3c77af5c5c5132afe596a97f8d13
ip_tunnel: Do not use stale inner_iph pointer.

[ Upstream commit d4a71b155c12d0d429c6b69d94076d6d57e2a7a7 ]

While sending packet skb_cow_head() can change skb header which
invalidates inner_iph pointer to skb header. Following patch
avoid using it. Found by code inspection.

This bug was introduced by commit 0e6fbc5b6c6218 (ip_tunnels: extend
iptunnel_xmit()).

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_tunnel.c