]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_tunnel: must reload ipv6h in ip6ip6_tnl_xmit()
authorEric Dumazet <edumazet@google.com>
Tue, 24 Jan 2017 00:43:05 +0000 (16:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jan 2017 19:53:24 +0000 (14:53 -0500)
commitcee286f35398697d728c4c907fb9e360a4f5f991
treee7f434a5d9961bd65a461dffe8c7a010dd74ecca
parenta4240a05fdbe17952e01ce82b9e09391458260f7
ip6_tunnel: must reload ipv6h in ip6ip6_tnl_xmit()

Since ip6_tnl_parse_tlv_enc_lim() can call pskb_may_pull(),
we must reload any pointer that was related to skb->head
(or skb->data), or risk use after free.

Fixes: 049b2892814b ("gre: Support GRE over IPv6")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c
net/ipv6/ip6_tunnel.c