diff options
author | James Morris <james.morris@microsoft.com> | 2019-01-22 23:33:10 +0100 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-01-22 23:33:10 +0100 |
commit | 9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a (patch) | |
tree | e9c1e5d2400ad20c5a9cd633b52a42a00d1d98cb /security/yama | |
parent | LSM: Make some functions static (diff) | |
parent | Linux 5.0-rc3 (diff) | |
download | linux-9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a.tar.xz linux-9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a.zip |
Merge tag 'v5.0-rc3' into next-general
Sync to Linux 5.0-rc3 to pull in the VFS changes which impacted a lot
of the LSM code.
Diffstat (limited to 'security/yama')
-rw-r--r-- | security/yama/yama_lsm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index eb1da1303d2e..57cc60722dd3 100644 --- a/security/yama/yama_lsm.c +++ b/security/yama/yama_lsm.c @@ -368,7 +368,9 @@ static int yama_ptrace_access_check(struct task_struct *child, break; case YAMA_SCOPE_RELATIONAL: rcu_read_lock(); - if (!task_is_descendant(current, child) && + if (!pid_alive(child)) + rc = -EPERM; + if (!rc && !task_is_descendant(current, child) && !ptracer_exception_found(current, child) && !ns_capable(__task_cred(child)->user_ns, CAP_SYS_PTRACE)) rc = -EPERM; |