Commit:     492c8b332e3af279ffadf49b85967d5e43810923
Parent:     5a1b63914815e4223ceb3d079286e18f9ee92b4b
Author:     Christoph Hellwig <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 13:57:53 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 23 20:14:13 2007 -0700

    uselib: add missing MNT_NOEXEC check
    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 <[EMAIL PROTECTED]>
    Cc: Ulrich Drepper <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/exec.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 0b68588..f20561f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -134,6 +134,9 @@ asmlinkage long sys_uselib(const char __user * library)
        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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to