]> Git Repo - J-linux.git/commitdiff
exit_notify: kill the wrong capable(CAP_KILL) check
authorOleg Nesterov <[email protected]>
Mon, 6 Apr 2009 14:16:02 +0000 (16:16 +0200)
committerLinus Torvalds <[email protected]>
Mon, 6 Apr 2009 21:57:23 +0000 (14:57 -0700)
The CAP_KILL check in exit_notify() looks just wrong, kill it.

Whatever logic we have to reset ->exit_signal, the malicious user
can bypass it if it execs the setuid application before exiting.

Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/exit.c

index 6686ed1e4aa3aedd25a613d3ad7282798392f224..32cbf2607cb0dab54f8463196aca522b29a624a5 100644 (file)
@@ -837,8 +837,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
         */
        if (tsk->exit_signal != SIGCHLD && !task_detached(tsk) &&
            (tsk->parent_exec_id != tsk->real_parent->self_exec_id ||
-            tsk->self_exec_id != tsk->parent_exec_id) &&
-           !capable(CAP_KILL))
+            tsk->self_exec_id != tsk->parent_exec_id))
                tsk->exit_signal = SIGCHLD;
 
        signal = tracehook_notify_death(tsk, &cookie, group_dead);
This page took 0.044052 seconds and 4 git commands to generate.