linux/security
Kees Cook 0c8a56a6fa Yama: Check for pid death before checking ancestry
commit 9474f4e7cd upstream.

It's possible that a pid has died before we take the rcu lock, in which
case we can't walk the ancestry list as it may be detached. Instead, check
for death first before doing the walk.

Reported-by: syzbot+a9ac39bf55329e206219@syzkaller.appspotmail.com
Fixes: 2d514487fa ("security: Yama LSM")
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.morris@microsoft.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-05-02 21:41:23 +01:00
..
apparmor apparmor: remove no-op permission check in policy_unpack 2018-12-16 22:08:51 +00:00
integrity ima: fix showing large 'violations' or 'runtime_measurements_count' 2019-02-11 17:53:30 +00:00
keys KEYS: encrypted: fix buffer overread in valid_master_desc() 2018-12-16 22:09:44 +00:00
selinux selinux: KASAN: slab-out-of-bounds in xattr_getsecurity 2018-10-21 08:46:21 +01:00
smack security: let security modules use PTRACE_MODE_* with bitmasks 2018-01-01 20:52:10 +00:00
tomoyo get rid of pointless checks for NULL ->i_op 2014-04-01 23:19:16 -04:00
yama Yama: Check for pid death before checking ancestry 2019-05-02 21:41:23 +01:00
capability.c Merge tag 'keys-20140314' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next 2014-04-14 11:42:49 +10:00
commoncap.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2017-09-15 18:30:17 +01:00
device_cgroup.c device_cgroup: use css_has_online_children() instead of has_children() 2014-05-16 13:22:52 -04:00
inode.c sysfs: Create mountpoints with sysfs_create_mount_point 2015-08-20 18:24:03 +01:00
Kconfig KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-09 00:35:20 +00:00
lsm_audit.c audit: anchor all pid references in the initial pid namespace 2014-03-20 10:11:55 -04:00
Makefile security: cleanup Makefiles to use standard syntax for specifying sub-directories 2014-02-17 11:08:04 +11:00
min_addr.c mmap_min_addr check CAP_SYS_RAWIO only for write 2010-04-23 08:56:31 +10:00
security.c vfs: Commit to never having exectuables on proc and sysfs. 2017-04-04 22:21:56 +01:00