[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090406141602.GA17561@redhat.com>
Date: Mon, 6 Apr 2009 16:16:02 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Chris Evans <scarybeasts@...il.com>,
David Howells <dhowells@...hat.com>,
Don Howard <dhoward@...hat.com>,
Eugene Teo <eugene@...hat.com>,
Michael Kerrisk <mtk.manpages@...glemail.com>,
Roland McGrath <roland@...hat.com>,
Tavis Ormandy <taviso@....lonestar.org>,
Vitaly Mayatskikh <vmayatsk@...hat.com>,
linux-kernel@...r.kernel.org, Serge Hallyn <serue@...ibm.com>
Subject: [PATCH, RESEND] exit_notify: kill the wrong capable(CAP_KILL) check
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 <oleg@...hat.com>
Acked-by: Serge Hallyn <serue@...ibm.com>
--- 6.30/kernel/exit.c~EXIT_CAP_KILL 2009-04-06 00:03:42.000000000 +0200
+++ 6.30/kernel/exit.c 2009-04-06 15:30:32.000000000 +0200
@@ -837,8 +837,7 @@ static void exit_notify(struct task_stru
*/
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists