aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/tests/shell/test_stackcollapse_python.sh
diff options
context:
space:
mode:
authorKyle Zeng <kylebot@openai.com>2026-10-30 22:07:52 -0700
committerJakub Kicinski <kuba@kernel.org>2026-11-10 09:42:41 -0800
commit44818c9a826d766dc0e21179dc76f229334f1dda (patch)
tree4b1606356ec3fa3f1a8d5c0ca558ab88f5ebea50 /tools/perf/tests/shell/test_stackcollapse_python.sh
parentMAINTAINERS: Add Hidayath as net/iucv maintainer (diff)
net: gro: avoid parsing headers from shared fragments
When an skb has an empty linear head, skb_gro_reset_offset() can expose the first page fragment directly to GRO header parsers. For an SKBFL_SHARED_FRAG skb, those bytes may still be writable through a file mapping. Headers validated during receive can therefore differ from the headers later copied into the linear head and used during completion. For example, changing an IPv6 destination-options length between the short and full header fetches in ipv6_gro_pull_exthdrs() can make ipv6_gro_complete() pass an out-of-bounds offset to udp6_gro_complete(). A userspace reproducer triggered a KASAN slab-out-of-bounds read there on an unmodified kernel as UID 1000. The same completion path can write the UDP checksum and length through the invalid offset. The packet has trusted TCP GSO metadata and spliced file data, so it reaches completion without an skb zerocopy destructor or a second GRO packet. Disable the direct-fragment fast path for skbs with externally writable fragments. With an empty linear head, frag0_len remains zero, so skb_gro_header_slow() pulls each required header into the linear head before it is inspected. Subsequent pulls preserve the validated prefix. This covers both gro_receive_skb() and napi_gro_frags(), including other protocols using the same helpers. Linear headers and private fragments retain their existing fast paths. Codex assisted with review of the supplied report, reproducer and draft fix, related-path analysis, and this changelog. The patched net/core/gro.o builds with W=1 using the supplied x86-64 configuration, allyesconfig and allmodconfig. The fix was checked by code-path analysis; the reproducer and kernel selftests have not been run on a booted patched kernel. The issue was found by an LLM. Fixes: dff0b0161ad5 ("net: gro: parse ipv6 ext headers without frag0 invalidation") Cc: stable@kernel.org Signed-off-by: Kyle Zeng <kylebot@openai.com> Link: https://patch.msgid.link/20261031050752.31869-1-kylebot@openai.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/tests/shell/test_stackcollapse_python.sh')
0 files changed, 0 insertions, 0 deletions