Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95ef498d authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

ipv6: ip6_make_skb() needs to clear cork.base.dst



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: 862c03ee ("ipv6: fix possible mem leaks in ipv6_make_skb()")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 37f47bc9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1735,6 +1735,7 @@ struct sk_buff *ip6_make_skb(struct sock *sk,
	cork.base.flags = 0;
	cork.base.addr = 0;
	cork.base.opt = NULL;
	cork.base.dst = NULL;
	v6_cork.opt = NULL;
	err = ip6_setup_cork(sk, &cork, &v6_cork, ipc6, rt, fl6);
	if (err) {