]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_tunnel: fix possible use-after-free on xmit
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Thu, 25 Jul 2019 16:40:17 +0000 (00:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jul 2019 21:17:44 +0000 (14:17 -0700)
commit209db0d6bcb73b2fb227f1be33873d36cac95d30
treea5131a096a2872bac0fcd888ebfd6c46ee174ed8
parent308f9944d1d1396287f32013827e2352f38fe958
ip6_tunnel: fix possible use-after-free on xmit

ip4ip6/ip6ip6 tunnels run iptunnel_handle_offloads on xmit which
can cause a possible use-after-free accessing iph/ipv6h pointer
since the packet will be 'uncloned' running pskb_expand_head if
it is a cloned gso skb.

Fixes: f11dd6e1180e ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets")
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_tunnel.c