summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2026-09-18 20:50:27 +0200
committerMickaël Salaün <mic@digikod.net>2026-09-20 11:08:02 +0200
commit98b04ab00f0e738d69bd718228db55483a911b7a (patch)
tree0391a270db0a640ab8b9e46fc5ef402b0c31c3d4 /tools/perf/scripts/python/stackcollapse.py
parent1a985d3890ed8caa428390a5682e957503f14060 (diff)
downloadlinux-next-98b04ab00f0e738d69bd718228db55483a911b7a.tar.gz
linux-next-98b04ab00f0e738d69bd718228db55483a911b7a.zip
landlock: Fix network denial trace context
Network denial events report source and destination ports reconstructed from audit data. Their zero values are ambiguous, and neither identifies the complete endpoint that Landlock checked. Carry the checked sockaddr and its signed length in a private trace-only context. For an enabled event, validate the length and copy only the initialized prefix into zeroed local storage. This prevents a typed BPF program from reading uninitialized bytes while exposing the socket family, socket, address, and length. Replace the source and destination trace-record fields with one signed port derived from the checked address. A value of -1 means that no port was checked, zero is a valid port, and positive values use host endianness. Bind blockers select the bind address; connect and send blockers select the destination. Cc: Günther Noack <gnoack@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Fixes: 01ce260f5ccf ("landlock: Add landlock_deny_access_fs and landlock_deny_access_net") Link: https://patch.msgid.link/20260918185036.608651-5-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions