Skip to content

Commit b13dda9

Browse files
edumazetdavem330
authored andcommitted
net: initialize skb->peeked when cloning
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: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <[email protected]> Reported-by: syzbot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b1993a2 commit b13dda9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/skbuff.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb)
857857
n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len;
858858
n->cloned = 1;
859859
n->nohdr = 0;
860+
n->peeked = 0;
860861
n->destructor = NULL;
861862
C(tail);
862863
C(end);

0 commit comments

Comments
 (0)