mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Check flags for MAP_FIXED instead of prot in sys$mmap
We were accidentally not enforcing the map_fixed pledge
This commit is contained in:
parent
6b08b18a9a
commit
01318d8f9b
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/01318d8f9b Pull-request: https://github.com/SerenityOS/serenity/pull/18234 Reviewed-by: https://github.com/supercomputer7
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<Syscall::SC_mmap_params const*> use
|
|||
TRY(require_promise(Pledge::prot_exec));
|
||||
}
|
||||
|
||||
if (prot & MAP_FIXED || prot & MAP_FIXED_NOREPLACE) {
|
||||
if (flags & MAP_FIXED || flags & MAP_FIXED_NOREPLACE) {
|
||||
TRY(require_promise(Pledge::map_fixed));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue