lkml.org 
[lkml]   [2007]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] uselib: add missing MNT_NOEXEC check
    On Thu, May 17, 2007 at 09:14:06AM -0700, Ulrich Drepper wrote:
    > > error = -EINVAL;
    > >+ if (nd.mnt->mnt_flags & MNT_NOEXEC)
    > >+ goto exit;
    >
    > ... the error here should be EACCES. Aside from that you get an ACK from
    > me.

    updated patch below:

    Index: linux-2.6/fs/exec.c
    ===================================================================
    --- linux-2.6.orig/fs/exec.c 2007-05-17 14:43:25.000000000 +0200
    +++ linux-2.6/fs/exec.c 2007-05-17 19:42:49.000000000 +0200
    @@ -134,6 +134,9 @@ asmlinkage long sys_uselib(const char __
    if (error)
    goto out;

    + error = -EACCES;
    + if (nd.mnt->mnt_flags & MNT_NOEXEC)
    + goto exit;
    error = -EINVAL;
    if (!S_ISREG(nd.dentry->d_inode->i_mode))
    goto exit;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-05-17 20:47    [W:0.026 / U:124.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site