]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lsm: hold cred_guard_mutex for lsm_set_self_attr()
authorStephen Smalley <stephen.smalley.work@gmail.com>
Wed, 13 May 2026 18:05:06 +0000 (14:05 -0400)
committerPaul Moore <paul@paul-moore.com>
Thu, 14 May 2026 20:47:59 +0000 (16:47 -0400)
commit4a9b16541ad3faf8bccb398532bf3f8b6bbf1188
treec8f110c5cb7f1e0acaba821b9fe23b4d50a84e16
parent254f49634ee16a731174d2ae34bc50bd5f45e731
lsm: hold cred_guard_mutex for lsm_set_self_attr()

Just as proc_pid_attr_write() already does before calling the LSM
hook. This only matters for SELinux and AppArmor which check
whether the process is being ptraced and if so, whether to
allow the transition.

Cc: stable@vger.kernel.org
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/lsm_syscalls.c