Messages in this thread Patch in this message | | | From | Topi Miettinen <> | Subject | [PATCH] 2.2.4 ptrace capability check incorrect, fix | Date | Wed, 24 Mar 1999 23:00:46 +0200 |
| |
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/
| |