[PATCH 2/6] landlock: Restrict capabilities guarding other LSMs' policies
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 10 20:38:08 UTC 2026
> A process in a domain that denies CAP_MAC_ADMIN or CAP_MAC_OVERRIDE
> could still use them for AppArmor, Smack or SELinux policy, and
> CAP_SYS_PTRACE for Smack's ptrace rule, because these LSMs check them
> with cap_capable() instead of capable().
>
> Implement the capable_lsm hook with the same check as the capable hook,
> so that such capability uses are restricted like any other. The
> following commits switch these LSMs to security_capable_lsm().
>
> Cc: Christian Brauner <brauner at kernel.org>
> Cc: Günther Noack <gnoack at google.com>
> Cc: Paul Moore <paul at paul-moore.com>
> Cc: Serge Hallyn <serge at hallyn.com>
> Fixes: 97c8386f1d74 ("landlock: Enforce capability restrictions")
> Signed-off-by: Mickaël Salaün <mic at digikod.net>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110203042.2410140-1-mic@digikod.net?part=2
More information about the Linux-security-module-archive
mailing list