Commit 492c8b33 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Cc: Ulrich Drepper <drepper@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5a1b6391
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment