aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorKees Cook <kees.cook@canonical.com>2010-07-10 12:12:20 -0700
committerLeann Ogasawara <leann.ogasawara@canonical.com>2010-08-11 07:42:27 -0700
commit4b45d8e2be4e1e786affd73a4e9379734c803d72 (patch)
tree86d42c39618ab73ec97d7be73a79ac10dbcd99f9 /security
parent257c181acb9cb1ac8507fb99700dc709dfe8a00b (diff)
UBUNTU: SAUCE: Yama: check PTRACE using thread group leader
When examining process ancestory, we must use the thread group leader or else we end up missing potential matches. [submitted upstream to security-next] Signed-off-by: Kees Cook <kees.cook@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'security')
-rw-r--r--security/yama/yama_lsm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
index 291a9e5dc21..b28d9ccf25d 100644
--- a/security/yama/yama_lsm.c
+++ b/security/yama/yama_lsm.c
@@ -170,6 +170,8 @@ static int task_is_descendant(struct task_struct *parent,
rcu_read_lock();
read_lock(&tasklist_lock);
while (walker->pid > 0) {
+ if (!thread_group_leader(walker))
+ walker = walker->group_leader;
if (walker == parent) {
rc = 1;
break;