summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-08-06 09:27:24 -0700
committerJakub Kicinski <kuba@kernel.org>2026-08-06 09:27:25 -0700
commit4be5b041e679cbae7fdc22781888ba08df7f27bf (patch)
tree97419de8a99d62dfc355e27d91fd00879b05b069 /tools/perf/scripts/python
parentbfec39ff1484b4e9f7d93bc4580fdb634bbc7d19 (diff)
parent21b5953e7494c16a42e6cd8cf110e18d13ae4a6b (diff)
Merge branch 'net-fix-hard_header_len-races-in-packet-send-paths'
Qihang Tang says: ==================== net: fix hard_header_len races in packet send paths The packet socket TX paths read dev->hard_header_len independently for skb allocation and header construction. Concurrent netdevice reconfiguration (e.g. bonding device type changes) can change this value in between, leading to mismatched headroom and copy length, and in the SOCK_RAW case to out-of-bounds writes. Patch 1 removes the CAP_SYS_RAWIO zero-padding branch in dev_validate_header(). That branch sizes a memset against the live dev->hard_header_len while operating on an skb whose headroom was allocated from an earlier hard_header_len read, so a concurrent increase can write past the reserved buffer. Removing it first keeps the later snapshot fixes bisect-safe: they do not replace an earlier skb_under_panic with a silent overwrite. Patches 2 and 3 snapshot hard_header_len once per send and use it consistently for allocation and construction, in the non-ring and TX_RING paths respectively. The separate SOCK_DGRAM consistency problem between hard_header_len and header_ops->create remains out of scope, as noted in the commit messages. ==================== Link: https://patch.msgid.link/20260805125729.19220-1-q.h.hack.winter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions