[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070517184414.GA19690@lst.de>
Date: Thu, 17 May 2007 20:44:14 +0200
From: Christoph Hellwig <hch@....de>
To: Ulrich Drepper <drepper@...il.com>
Cc: Christoph Hellwig <hch@....de>, akpm@...l.org,
linux-kernel@...r.kernel.org
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists