From: Christoph Hellwig <hch@lst.de>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uselib: add missing MNT_NOEXEC check
Date: Thu, 17 May 2007 20:44:14 +0200 [thread overview]
Message-ID: <20070517184414.GA19690@lst.de> (raw)
In-Reply-To: <a36005b50705170914i17bd853bj638f5098c4e7d788@mail.gmail.com>
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;
prev parent reply other threads:[~2007-05-17 18:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 13:55 [PATCH] uselib: add missing MNT_NOEXEC check Christoph Hellwig
2007-05-17 16:14 ` Ulrich Drepper
2007-05-17 18:44 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070517184414.GA19690@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=drepper@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.