[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090225190218.GA7453@redhat.com>
Date: Wed, 25 Feb 2009 20:02:18 +0100
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>, stable@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] exit_notify: kill the wrong capable(CAP_KILL) check
I can't understand why exit_notify() checks capable(CAP_KILL), but this
looks just wrong.
Whatever logic we have to reset ->exit_signal, the bad user can bypass
it if it execs the setuid application before exiting, kill the CAP_KILL
check.
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
--- 6.29-rc3/kernel/exit.c~2_EXIT_NOTIFY 2009-02-13 07:04:12.000000000 +0100
+++ 6.29-rc3/kernel/exit.c 2009-02-25 19:41:57.000000000 +0100
@@ -874,8 +874,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