Yama: higher restrictions should block PTRACE_TRACEME
authorKees Cook <keescook@chromium.org>
Fri, 10 Aug 2012 02:01:26 +0000 (19:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 14:53:04 +0000 (07:53 -0700)
commitc7d190158502024773de8bc4822fbd737a2bb9d0
tree744473883208441ab2a151191add76cdfe15db91
parentd534db404b17a81f1edbe10de0f1b67f1813d427
Yama: higher restrictions should block PTRACE_TRACEME

commit 9d8dad742ad1c74d7e7210ee05d0b44961d5ea16 upstream.

The higher ptrace restriction levels should be blocking even
PTRACE_TRACEME requests. The comments in the LSM documentation are
misleading about when the checks happen (the parent does not go through
security_ptrace_access_check() on a PTRACE_TRACEME call).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/security/Yama.txt
include/linux/security.h
security/yama/yama_lsm.c