mirror of https://gitee.com/openkylin/linux.git
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@redhat.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
22ae77bc7a
commit
432870dab8
|
@ -837,8 +837,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
|
|||
*/
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue