mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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]>
This commit is contained in:
parent
5a1b639148
commit
492c8b332e
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue