summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec
diff options
context:
space:
mode:
authorKyle Zeng <kylebot@openai.com>2026-10-29 21:23:29 -0700
committerJakub Kicinski <kuba@kernel.org>2026-11-09 15:18:05 -0800
commit86706ffa990ecd46a4326f8eecbccbbd60a6cb8d (patch)
tree4869826fd8db8afafb2475f9bd66a4420d54d4e6 /rust/kernel/alloc/kvec
parent0f47fce51a98d3d9f439c16861d519a7b833a176 (diff)
net: skbuff: preserve fclone lifetime when freeing stolen heads
skb_morph() can give an skb from skbuff_fclone_cache a page-fragment head without changing its fclone tag. IPv4 reassembly can produce such an skb, which can subsequently reach the GRO stolen-head path. napi_skb_free_stolen_head() puts the shell into the ordinary NAPI skb cache without dropping its fclone_ref. If the embedded companion is still live, KASAN poisons it along with the original, and later cache reuse or eviction can overwrite or free the allocation underneath it. A mirrored batman-adv DAT packet retained in a plug qdisc reproduces a KASAN use-after-free in plug_dequeue(). Use kfree_skbmem() for fclones in napi_skb_free_stolen_head(), retaining NAPI caching for ordinary skb heads. Also use kfree_skbmem() in kfree_skb_partial(), whose stolen-head branch has the same assumption about the allocation cache. This releases the shell according to its allocation kind and preserves any live companion without freeing the data that has been transferred to the receiving skb. Fixes: f450d539c05a ("skbuff: introduce {,__}napi_build_skb() which reuses NAPI cache heads") Signed-off-by: Kyle Zeng <kylebot@openai.com> Link: https://patch.msgid.link/20261030042329.74461-1-kylebot@openai.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions