mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
Kernel: sys$munmap() region splitting did not preserve "shared" flag
This was exploitable since the shared flag determines whether inode permission checks are applied in sys$mprotect(). The bug was pretty hard to spot due to default arguments being used instead. This patch removes the default arguments to make explicit at each call site what's being done.
This commit is contained in:
@@ -454,7 +454,7 @@ OwnPtr<Region> MemoryManager::allocate_kernel_region_with_vmobject(const Range&
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
OwnPtr<Region> region;
|
||||
if (user_accessible)
|
||||
region = Region::create_user_accessible(nullptr, range, vmobject, 0, name, access, cacheable);
|
||||
region = Region::create_user_accessible(nullptr, range, vmobject, 0, name, access, cacheable, false);
|
||||
else
|
||||
region = Region::create_kernel_only(range, vmobject, 0, name, access, cacheable);
|
||||
if (region)
|
||||
|
||||
Reference in New Issue
Block a user