mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
Kernel: Prevent mmap-ing as both fixed and randomized
This commit is contained in:
parent
22b0ff05d4
commit
6876b9a514
1 changed files with 3 additions and 0 deletions
|
@ -128,6 +128,9 @@ void* Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> user_params)
|
|||
if (!map_shared && !map_private)
|
||||
return (void*)-EINVAL;
|
||||
|
||||
if (map_fixed && map_randomized)
|
||||
return (void*)-EINVAL;
|
||||
|
||||
if (!validate_mmap_prot(prot, map_stack))
|
||||
return (void*)-EINVAL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue