summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorKyle Zeng <kylebot@openai.com>2026-10-29 21:22:29 -0700
committerJakub Kicinski <kuba@kernel.org>2026-11-09 15:05:16 -0800
commit0f47fce51a98d3d9f439c16861d519a7b833a176 (patch)
tree79780d6c944c0c33490a9ca57e5fb9c756ef614d /scripts/stackusage
parentc2213d9b61c1d6e99645a636630ee767c7542f78 (diff)
ipv4: keep XFRM headers out of corked skb lengths
__ip_append_data() allocates space for dst.header_len in the first skb, but includes that space in skb->len until __ip_make_skb() pulls it. Fragment accounting uses an MTU that already excludes the XFRM headers. As a result, the next skb can have a fraggap larger than its capped datalen, and skb_copy_and_csum_bits() can overwrite its shared info. For example, five AH tunnel states can reserve 500 bytes while leaving an effective MTU of 348. With 40 bytes of IPv4 options, the second skb has room for 288 bytes of fragment data but receives a 500-byte gap copy. The overwritten shared info is subsequently consumed by the skb release paths. Reserve the XFRM headers together with the link-layer headroom instead. This keeps skb->len, the gap-copy offsets and the trim lengths relative to the IPv4 packet throughout corking. The network and transport header addresses and the headroom available to XFRM at output are unchanged. Both paged and linear allocations, including subsequent corked appends, use the corrected accounting. Fixes: 353e5c9abd90 ("ipv4: Fix IPsec slowpath fragmentation problem") Cc: stable@vger.kernel.org Signed-off-by: Kyle Zeng <kylebot@openai.com> Link: https://patch.msgid.link/20261030042229.74068-1-kylebot@openai.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions