linux-stable/security
Jann Horn ecf8e185a2 apparmor: don't try to replace stale label in ptraceme check
[ Upstream commit ca3fde5214 ]

begin_current_label_crit_section() must run in sleepable context because
when label_is_stale() is true, aa_replace_current_label() runs, which uses
prepare_creds(), which can sleep.

Until now, the ptraceme access check (which runs with tasklist_lock held)
violated this rule.

Fixes: b2d09ae449 ("apparmor: move ptrace checks to using labels")
Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:37:57 -04:00
..
apparmor apparmor: don't try to replace stale label in ptraceme check 2020-06-30 15:37:57 -04:00
integrity evm: Fix possible memory leak in evm_calc_hmac_or_hash() 2020-06-20 10:25:15 +02:00
keys mm: add kvfree_sensitive() for freeing sensitive data objects 2020-06-20 10:24:59 +02:00
loadpin security: mark LSM hooks as __ro_after_init 2017-03-06 11:00:15 +11:00
selinux selinux: fix double free 2020-06-25 15:41:59 +02:00
smack Smack: slab-out-of-bounds in vsscanf 2020-06-20 10:25:05 +02:00
tomoyo License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
yama Yama: Check for pid death before checking ancestry 2019-01-23 08:09:48 +01:00
commoncap.c exec: Always set cap_ambient in cap_bprm_set_creds 2020-06-03 08:18:01 +02:00
device_cgroup.c device_cgroup: fix RCU imbalance in error case 2019-04-27 09:35:40 +02:00
inode.c securityfs: fix use-after-free on symlink traversal 2019-05-25 18:25:34 +02:00
Kconfig /dev/mem: Add bounce buffer for copy-out 2018-03-24 11:01:24 +01:00
lsm_audit.c missing barriers in some of unix_sock ->addr and ->path accesses 2019-03-19 13:13:24 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
min_addr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
security.c LSM: Check for NULL cred-security on free 2019-01-23 08:09:50 +01:00