To handle orphaned character device vnodes properly in mmap(), check that
v_mount is non-null before dereferencing it. If it's null, behave as if MNT_NOEXEC was not set on the mount that originally containined it.
This commit is contained in:
parent
23826bb410
commit
a87b9baadb
@ -320,7 +320,7 @@ mmap(td, uap)
|
||||
* credentials do we use for determination? What if
|
||||
* proc does a setuid?
|
||||
*/
|
||||
if (vp->v_mount->mnt_flag & MNT_NOEXEC)
|
||||
if (vp->v_mount != NULL && vp->v_mount->mnt_flag & MNT_NOEXEC)
|
||||
maxprot = VM_PROT_NONE;
|
||||
else
|
||||
maxprot = VM_PROT_EXECUTE;
|
||||
|
Loading…
Reference in New Issue
Block a user