mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +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:
@@ -141,7 +141,7 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<Syscall::SC_mmap_params const*> use
|
|||||||
TRY(require_promise(Pledge::prot_exec));
|
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));
|
TRY(require_promise(Pledge::map_fixed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user