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>,
stable@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] exit_notify: kill the wrong capable(CAP_KILL) check
Date: Wed, 25 Feb 2009 20:02:18 +0100 [thread overview]
Message-ID: <20090225190218.GA7453@redhat.com> (raw)
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);
next reply other threads:[~2009-02-25 19:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 19:02 Oleg Nesterov [this message]
2009-02-25 19:41 ` [PATCH 2/2] exit_notify: kill the wrong capable(CAP_KILL) check 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
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=20090225190218.GA7453@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=stable@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.