diff options
author | Eric Dumazet <edumazet@google.com> | 2018-04-07 13:42:39 -0700 |
---|---|---|
committer | Sasha Levin <alexander.levin@microsoft.com> | 2018-05-22 21:36:40 -0400 |
commit | 75aae129cbe9cb32cd8606d80364a04bc879cc72 (patch) | |
tree | 0670a9a7139f1cbd15a75ed8454cfa5e2ac39afc | |
parent | 8618149be8b741e5eeb56a4ae641e3a0a83297a7 (diff) | |
download | linux-stable-75aae129cbe9cb32cd8606d80364a04bc879cc72.tar.gz |
net: initialize skb->peeked when cloning
[ Upstream commit b13dda9f9aa7caceeee61c080c2e544d5f5d85e5 ]
syzbot reported __skb_try_recv_from_queue() was using skb->peeked
while it was potentially unitialized.
We need to clear it in __skb_clone()
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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: Sasha Levin <alexander.levin@microsoft.com>
-rw-r--r-- | net/core/skbuff.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c2a9cbb020a8..ac1436be3cf7 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -875,6 +875,7 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb) n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len; n->cloned = 1; n->nohdr = 0; + n->peeked = 0; n->destructor = NULL; C(tail); C(end); |