lkml.org 
[lkml]   [2011]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [SECURITY] /proc/$pid/ leaks contents across setuid exec
    On Mon, 7 Feb 2011, Kees Cook wrote:

    > Sure, I know about O_CLOEXEC, but this is about protecting the
    > just-been-execed setuid process from the attacking process that has no
    > reason to set O_CLOEXEC.
    >
    > Something like this needs to be enforced on the kernel side. I.e. these
    > file in /proc need to have O_CLOEXEC set in a way that cannot be unset.
    >
    > > Changing the behavior in the core kernel will break userspace.
    >
    > I don't think /proc/$pid/* needs to stay open across execs, does it? Or at
    > least the non-0444 files should be handled separately.

    Actually, this seems like a more general kind of bug in proc rather than a
    leaked fd. Each child task should only see its own /proc/[pid] data.



    - James
    --
    James Morris
    <jmorris@namei.org>


    \
     
     \ /
      Last update: 2011-02-08 04:45    [W:0.020 / U:0.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site