linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] exit_notify: kill the wrong capable(CAP_KILL) check
@ 2009-02-25 19:02 Oleg Nesterov
  2009-02-25 19:41 ` Roland McGrath
  2009-04-06 14:16 ` [PATCH, RESEND] " Oleg Nesterov
  0 siblings, 2 replies; 11+ messages in thread
From: Oleg Nesterov @ 2009-02-25 19:02 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds
  Cc: Alan Cox, Chris Evans, David Howells, Don Howard, Eugene Teo,
	Michael Kerrisk, Roland McGrath, Tavis Ormandy,
	Vitaly Mayatskikh, stable, linux-kernel

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@redhat.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);


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-04-06 19:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-25 19:02 [PATCH 2/2] exit_notify: kill the wrong capable(CAP_KILL) check Oleg Nesterov
2009-02-25 19:41 ` Roland McGrath
2009-02-25 21:53   ` Serge E. Hallyn
2009-02-25 22:03     ` Oleg Nesterov
2009-02-25 22:14       ` Serge E. Hallyn
2009-02-25 22:32         ` Oleg Nesterov
2009-02-25 22:47           ` Serge E. Hallyn
2009-02-25 23:16             ` Oleg Nesterov
2009-02-25 23:54               ` Serge E. Hallyn
2009-04-06 14:16 ` [PATCH, RESEND] " Oleg Nesterov
2009-04-06 19:36   ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).