summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2026-11-18 17:32:50 +0100
committerMickaël Salaün <mic@digikod.net>2026-11-19 11:55:43 +0100
commit36ff564b8039d65cddc854b8ad7c14851a490616 (patch)
tree08a484a1383adaee548d208e28f7967fe863e7aa /tools/perf/scripts/python/bin
parenta873f3c213a6fc09aaa2bb389fba49f9bbe9d589 (diff)
landlock: Add capability objects to denial tracing
The capability denial tracepoint identifies the capability number but not the credentials or user namespace against which it was checked. Typed BPF consumers therefore cannot reconstruct the authoritative hook context, especially when a check targets a user namespace other than the caller's current namespace. Carry the exact cred and user_ns used by each commoncap check through check_cap() to the tracepoint's BTF prototype. The capable hook forwards its arguments. Other callers mirror old->user_ns for CAP_SETPCAP, and init_user_ns for CAP_SYS_RAWIO and CAP_SYS_ADMIN. The latter checks protect global hardening and the global admin memory reserve, so nested user-namespace capabilities must not authorize them. Keep these pointers out of TP_STRUCT__entry and TP_printk so the raw ring-buffer layout and textual format remain unchanged. They provide context only and do not participate in Landlock's verdict. Do not carry the capability options. CAP_OPT_NOAUDIT already suppresses the complete denial record, and the remaining option bits do not explain the checked security relationship. Cc: Günther Noack <gnoack@google.com> Fixes: 97c8386f1d74 ("landlock: Enforce capability restrictions") Link: https://patch.msgid.link/20261118163254.2554413-3-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions