* [PATCH net] ipv6: ip6_make_skb() needs to clear cork.base.dst
@ 2018-01-12 6:31 Eric Dumazet
2018-01-15 19:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2018-01-12 6:31 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Mike Maloney
From: Eric Dumazet <edumazet@google.com>
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>
---
net/ipv6/ip6_output.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 688ba5f7516b37c87b879036dce781bdcfa01739..78a774e7af12b5725577fb4aa3c917af2e171a8d 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1733,6 +1733,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) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ipv6: ip6_make_skb() needs to clear cork.base.dst
2018-01-12 6:31 [PATCH net] ipv6: ip6_make_skb() needs to clear cork.base.dst Eric Dumazet
@ 2018-01-15 19:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-01-15 19:20 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, maloney
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 11 Jan 2018 22:31:18 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> 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>
Applied and queued up for -stable, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-15 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12 6:31 [PATCH net] ipv6: ip6_make_skb() needs to clear cork.base.dst Eric Dumazet
2018-01-15 19:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).