lkml.org 
[lkml]   [2009]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    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@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);


    \
     
     \ /
      Last update: 2009-02-25 20:15    [W:0.020 / U:30.744 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site