Linux/linux 9474f4esecurity/yama yama_lsm.c

Yama: Check for pid death before checking ancestry

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 at syzkaller.appspotmail.com
Fixes: 2d514487faf1 ("security: Yama LSM")
Cc: stable at vger.kernel.org
Suggested-by: Oleg Nesterov <oleg at redhat.com>
Signed-off-by: Kees Cook <keescook at chromium.org>
Signed-off-by: James Morris <james.morris at microsoft.com>
DeltaFile
+3-1security/yama/yama_lsm.c
+3-11 files

UnifiedSplitRaw