From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Chris Evans <scarybeasts@gmail.com>,
David Howells <dhowells@redhat.com>,
Don Howard <dhoward@redhat.com>, Eugene Teo <eugene@redhat.com>,
Michael Kerrisk <mtk.manpages@googlemail.com>,
Roland McGrath <roland@redhat.com>,
Tavis Ormandy <taviso@sdf.lonestar.org>,
Vitaly Mayatskikh <vmayatsk@redhat.com>,
linux-kernel@vger.kernel.org, Serge Hallyn <serue@us.ibm.com>
Subject: [PATCH, RESEND] exit_notify: kill the wrong capable(CAP_KILL) check
Date: Mon, 6 Apr 2009 16:16:02 +0200 [thread overview]
Message-ID: <20090406141602.GA17561@redhat.com> (raw)
In-Reply-To: <20090225190218.GA7453@redhat.com>
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@redhat.com>
Acked-by: Serge Hallyn <serue@us.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);
next prev parent reply other threads:[~2009-04-06 14:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Oleg Nesterov [this message]
2009-04-06 19:36 ` [PATCH, RESEND] " Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090406141602.GA17561@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dhoward@redhat.com \
--cc=dhowells@redhat.com \
--cc=eugene@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
--cc=roland@redhat.com \
--cc=scarybeasts@gmail.com \
--cc=serue@us.ibm.com \
--cc=taviso@sdf.lonestar.org \
--cc=torvalds@linux-foundation.org \
--cc=vmayatsk@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).