ipv4: fix a potential use after free in ip_tunnel_core.c
authorLi RongQing <roy.qing.li@gmail.com>
Fri, 17 Oct 2014 08:53:23 +0000 (16:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 16:59:43 +0000 (08:59 -0800)
commit47738e6b62e1d89c103314e4b9c37ea3602d298e
tree7779b44624edb47312739b53ec28c2501662b495
parent102c052fd16e1e73fe2d69028f7c13e1b52571c8
ipv4: fix a potential use after free in ip_tunnel_core.c

[ Upstream commit 1245dfc8cadb258386fcd27df38215a0eccb1f17 ]

pskb_may_pull() maybe change skb->data and make eth pointer oboslete,
so set eth after pskb_may_pull()

Fixes:3d7b46cd("ip_tunnel: push generic protocol handling to ip_tunnel module")
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_tunnel_core.c