diff options
| author | Mickaël Salaün <mic@digikod.net> | 2026-11-18 15:52:07 +0100 |
|---|---|---|
| committer | Mickaël Salaün <mic@digikod.net> | 2026-11-19 11:55:29 +0100 |
| commit | 6b8fc8ab1801660b0441e5cc19a14d61f38df921 (patch) | |
| tree | 704e9febf19e9e1233f2b9b368cde1cc6a01052b /tools/perf/scripts/python | |
| parent | 25590e68c40753e28e4713d2dbfde6ba10a7daeb (diff) | |
landlock: Mediate CAP_SETPCAP for inheritable capabilities
cap_capset() checks CAP_SETPCAP with cap_capable() (through
cap_inh_is_capped()), which skips the capable hook, so a domain denying
CAP_SETPCAP cannot prevent adding capabilities outside of the old
inheritable and permitted sets to the inheritable set. Without
no_new_privs (possible when a task with CAP_SYS_ADMIN enforced the
domain), file inheritable capabilities can then grant permitted
capabilities on execve().
Add a Landlock capset hook that checks CAP_SETPCAP against the domain
under the same condition, as SELinux checks its own setcap permission in
this hook.
Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge Hallyn <serge@hallyn.com>
Acked-by: Serge Hallyn (AMD) <sergeh@kernel.org>
Reviewed-by: Günther Noack <gnoack@google.com>
Fixes: 97c8386f1d74 ("landlock: Enforce capability restrictions")
Link: https://patch.msgid.link/20261118145217.2551053-4-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
