linux/security
Christian Göttsche 2d7f105edb security: keys: perform capable check only on privileged operations
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>
2023-07-28 18:07:41 +00:00
..
2023-07-07 09:55:31 -07:00
2023-06-30 09:20:08 -07:00
2023-06-12 21:26:19 +02:00
2023-04-27 16:52:33 -07:00
2023-04-27 16:52:33 -07:00
2023-05-25 17:52:15 -04:00
2023-05-25 17:52:15 -04:00
2023-06-27 17:24:26 -07:00