linux/security
Christian Göttsche 896e9e5778 security: keys: perform capable check only on privileged operations
[ Upstream commit 2d7f105edb ]

If the current task fails the check for the queried capability via
`capable(CAP_SYS_ADMIN)` LSMs like SELinux generate a denial message.
Issuing such denial messages unnecessarily can lead to a policy author
granting more privileges to a subject than needed to silence them.

Reorder CAP_SYS_ADMIN checks after the check whether the operation is
actually privileged.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:23 +02:00
..
apparmor apparmor: fix missing error check for rhashtable_insert_fast 2023-07-19 16:22:07 +02:00
bpf
integrity integrity: Fix possible multiple allocation in integrity_inode_get() 2023-07-19 16:22:11 +02:00
keys security: keys: perform capable check only on privileged operations 2023-09-13 09:42:23 +02:00
landlock
loadpin LoadPin: Ignore the "contents" argument of the LSM hooks 2022-12-31 13:33:07 +01:00
lockdown
safesetid
selinux selinux: set next pointer before attaching to list 2023-08-30 16:11:07 +02:00
smack
tomoyo tomoyo: fix broken dependency on *.conf.default 2023-02-01 08:34:06 +01:00
yama
commoncap.c
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-07 11:11:56 +01:00
inode.c
Kconfig
Kconfig.hardening randstruct: disable Clang 15 support 2023-02-25 11:25:43 +01:00
lsm_audit.c
Makefile
min_addr.c
security.c ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-10 09:34:15 +01:00