[PATCH net v2 1/3] net: make room for the tunnel header in skb_segment_list()
From: Julius Bairaktaris
Date: Sun Oct 11 2026 - 12:31:43 EST
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
an IPIP tunnel and segmented in software hits skb_under_panic() when
the members were received with less headroom than the tunnel headers
need.
Call skb_cow_head() on each member before pushing it.
Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@xxxxxxxxxxxxxx>
---
net/core/skbuff.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 41beaf625421a..3f358c0fc0483 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4729,6 +4729,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
--
2.53.0