diff options
author | James Morris <james.morris@microsoft.com> | 2019-01-22 14:33:10 -0800 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-01-22 14:33:10 -0800 |
commit | 9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a (patch) | |
tree | e9c1e5d2400ad20c5a9cd633b52a42a00d1d98cb /security/yama | |
parent | 3e8c73671244af16f1a6042f1c10d13b75cd1156 (diff) | |
parent | 49a57857aeea06ca831043acbb0fa5e0f50602fd (diff) | |
download | linux-9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a.tar.gz linux-9624d5c9c7ff6836bbf9f9b230fd1fcf3d56f91a.tar.bz2 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; |