summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMark Amirkan <markdamirkan@gmail.com>2026-09-13 17:14:09 -0700
committerJakub Kicinski <kuba@kernel.org>2026-09-16 17:26:40 -0700
commita9ce4053dc945c5372dedba5017ee675b30dc0c5 (patch)
treefc018e933608c0e7689f4aabfd134b99060fcfab /tools/perf/scripts/python/stackcollapse.py
parentf6fb2ac5e19ae4b66112a698050db80e51f841c3 (diff)
downloadlinux-next-a9ce4053dc945c5372dedba5017ee675b30dc0c5.tar.gz
linux-next-a9ce4053dc945c5372dedba5017ee675b30dc0c5.zip
net: lan743x: fix RX checksum use-after-free
lan743x_rx_process_buffer() adds each non-first receive buffer to the head skb's frag_list. On the last descriptor, lan743x_rx_trim_skb() linearizes the head and frees the fragment skb metadata. The checksum-success path then writes ip_summed through the local skb pointer, which still points to the final fragment. This causes a use-after-free write when a packet spans more than one receive buffer. Set ip_summed on the surviving head skb instead. Multi-buffer receive can occur after a live MTU increase because existing ring entries keep their old buffer size until they are replenished. A KUnit test invoking lan743x_rx_process_buffer() with a two-buffer packet produced a one-byte KASAN use-after-free write before this change. The same test passed after the change. The driver object also builds with W=1. This was not tested on physical LAN743x hardware. Fixes: cd6910501cfd ("net: lan743x: Add support for Rx IP & TCP checksum offload") Cc: stable@vger.kernel.org Signed-off-by: Mark Amirkan <markdamirkan@gmail.com> Reviewed-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Link: https://patch.msgid.link/20260913-b4-send-lan743x-uaf-v1-1-73d563d08ba9@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions