ipv6: ip6_make_skb() needs to clear cork.base.dst
authorEric Dumazet <edumazet@google.com>
Fri, 12 Jan 2018 06:31:18 +0000 (22:31 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:03:45 +0000 (14:03 +0100)
commit3472170784d849018356e0bcb7d5c993ffc65699
tree285a5ca4dede642a8c110be4b5d376d1bf95dd49
parent8278804e05f6bcfe3fdfea4a404020752ead15a6
ipv6: ip6_make_skb() needs to clear cork.base.dst

[ Upstream commit 95ef498d977bf44ac094778fd448b98af158a3e6 ]

In my last patch, I missed fact that cork.base.dst was not initialized
in ip6_make_skb() :

If ip6_setup_cork() returns an error, we might attempt a dst_release()
on some random pointer.

Fixes: 862c03ee1deb ("ipv6: fix possible mem leaks in ipv6_make_skb()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/ip6_output.c