summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorChris J Arges <carges@cloudflare.com>2026-11-18 08:32:27 -0600
committerPaolo Abeni <pabeni@redhat.com>2026-11-19 15:28:29 +0100
commitb10c986f1769287270de248548476f6dc2275d59 (patch)
treea7aa661df81cbcb026b91c06e4a536f0baf24f77 /tools/perf/scripts/python/bin
parenta1671b708d2c063d036f6e4c997e63539c2c2f3e (diff)
net: prevent receive header offset overflow during decapsulation
Repeated decapsulation can leave skb->data far from skb->head while the remaining packet data is still valid. Since the skb header positions are 16-bit offsets, a later header update can truncate and make header access use unrelated bytes and eventually crash. Limit receive headroom to 32 KiB. This is well beyond the headroom of normal packets while allowing the networking stack to pull enough headers in a single pass without overflowing 16-bit header offsets. Tunnel decapsulation re-enters __netif_receive_skb_core(), so its check protects nested IPIP and GRE. FOU and GUE bypass receive core, so check their IPv4 and IPv6 resubmission paths too. Together, these checks prevent 16-bit header-offset truncation in cases of repeated decapsulation. Report these rejections with the SKB_RX_HEADROOM drop reason. Fixes: 1a37e412a022 ("net: Use 16bits for *_headers fields of struct skbuff") Cc: stable@kernel.org Suggested-by: Eric Dumazet <edumazet@kernel.org> Signed-off-by: Chris J Arges <carges@cloudflare.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261118-prevent_rx_header_offset_overflow-v1-1-92a5be55f994@cloudflare.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions