]> git.baikalelectronics.ru Git - kernel.git/commit
security: Add LSM hook to setgroups() syscall
authorMicah Morton <mortonm@chromium.org>
Wed, 8 Jun 2022 20:57:11 +0000 (20:57 +0000)
committerMicah Morton <mortonm@chromium.org>
Fri, 15 Jul 2022 18:21:49 +0000 (18:21 +0000)
commit646bfbaaf0e728ac01a6abcfe9c9b4b5ddaafa1e
tree5cb709520c62f77b5a276d77d069a0238b2443ae
parent819157b88c3b41bb7e0c97b32e548765983b1df5
security: Add LSM hook to setgroups() syscall

Give the LSM framework the ability to filter setgroups() syscalls. There
are already analagous hooks for the set*uid() and set*gid() syscalls.
The SafeSetID LSM will use this new hook to ensure setgroups() calls are
allowed by the installed security policy. Tested by putting print
statement in security_task_fix_setgroups() hook and confirming that it
gets hit when userspace does a setgroups() syscall.

Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
include/linux/lsm_hook_defs.h
include/linux/lsm_hooks.h
include/linux/security.h
kernel/groups.c
security/security.c