netfilter: ipv6: fix use-after-free Write in nf_nat_ipv6_manip_pkt
authorFlorian Westphal <fw@strlen.de>
Mon, 19 Feb 2018 07:10:17 +0000 (08:10 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 25 Feb 2018 19:03:54 +0000 (20:03 +0100)
commitb078556aecd791b0e5cb3a59f4c3a14273b52121
treeb0c147bff261292b2a83d5d608336e5cbccc38e1
parent1a9da5937386dbe553ffcf6c65d985bd48c347c5
netfilter: ipv6: fix use-after-free Write in nf_nat_ipv6_manip_pkt

l4proto->manip_pkt() can cause reallocation of skb head so pointer
to the ipv6 header must be reloaded.

Reported-and-tested-by: <syzbot+10005f4292fc9cc89de7@syzkaller.appspotmail.com>
Fixes: 58a317f1061c89 ("netfilter: ipv6: add IPv6 NAT support")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv6/netfilter/nf_nat_l3proto_ipv6.c