mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
net: make room for the tunnel header in skb_segment_list()
skb_segment_list() pushes each frag_list member back to the outer MAC
header and copies the tunnel headers in front of it, but never checks
that the member has the headroom. A fraglist GRO packet forwarded into
a tunnel and segmented in software then hits skb_under_panic() on IPIP,
and on VXLAN the copy writes before the member's head (KASAN:
slab-out-of-bounds write in skb_segment_list()).
Call skb_cow_head() on each member before pushing it.
Fixes: 3a1296a38d ("net: Support GRO/GSO fraglist chaining.")
Tested-by: Henry Martin <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: Julius Bairaktaris <[email protected]>
Link: https://patch.msgid.link/c976a72586cda383b3e42486ee3d0176033b973c.1794151759.git.julius@bairaktaris.de
Signed-off-by: Paolo Abeni <[email protected]>
This commit is contained in:
committed by
Paolo Abeni
parent
12fc46d870
commit
abccf171fa
@@ -4789,6 +4789,10 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
|
||||
}
|
||||
}
|
||||
|
||||
if (!err)
|
||||
err = skb_cow_head(nskb, offset + tnl_hlen -
|
||||
skb_network_offset(nskb));
|
||||
|
||||
if (!tail)
|
||||
skb->next = nskb;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user