lkml.org 
[lkml]   [1999]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] 2.2.4 ptrace capability check incorrect, fix
Date
2.2.4 still has the ptrace capability check wrong.

Observed:
# bash -c 'sleep 10 & execcap = strace -p $!'
_exit(0) = ?

Expected:
# bash -c 'sleep 10 & execcap = strace -p $!'
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted

-Topi

--- arch/i386/kernel/ptrace.c.orig Wed Mar 24 22:48:35 1999
+++ arch/i386/kernel/ptrace.c Wed Mar 24 22:48:45 1999
@@ -386,7 +386,7 @@
(current->uid != child->uid) ||
(current->gid != child->egid) ||
(current->gid != child->sgid) ||
- (cap_issubset(child->cap_permitted, current->cap_permitted)) ||
+ (!cap_issubset(child->cap_permitted, current->cap_permitted)) ||
(current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
goto out;
/* the same process cannot be attached many times */




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.030 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site