All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] uselib: add missing MNT_NOEXEC check
Date: Thu, 17 May 2007 15:55:26 +0200	[thread overview]
Message-ID: <20070517135526.GA28213@lst.de> (raw)

We don't allow loading ELF shared library from noexec points so the
same should apply to sys_uselib aswell.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/exec.c
===================================================================
--- linux-2.6.orig/fs/exec.c	2007-04-24 14:22:40.000000000 +0200
+++ linux-2.6/fs/exec.c	2007-04-24 14:22:57.000000000 +0200
@@ -133,6 +133,8 @@ asmlinkage long sys_uselib(const char __
 		goto out;
 
 	error = -EINVAL;
+	if (nd.mnt->mnt_flags & MNT_NOEXEC)
+		goto exit;
 	if (!S_ISREG(nd.dentry->d_inode->i_mode))
 		goto exit;
 

             reply	other threads:[~2007-05-17 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 13:55 Christoph Hellwig [this message]
2007-05-17 16:14 ` [PATCH] uselib: add missing MNT_NOEXEC check Ulrich Drepper
2007-05-17 18:44   ` Christoph Hellwig

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=20070517135526.GA28213@lst.de \
    --to=hch@lst.de \
    --cc=akpm@osdl.org \
    --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.