mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:25:08 +00:00
Kernel: Let's also not consider kernel regions to be valid user stacks
This one is less obviously exploitable than the previous one, but still a bug nonetheless.
This commit is contained in:
parent
0fc24fe256
commit
66d5ebafa6
1 changed files with 2 additions and 2 deletions
|
@ -586,8 +586,8 @@ void MemoryManager::unquickmap_page()
|
|||
|
||||
bool MemoryManager::validate_user_stack(const Process& process, VirtualAddress vaddr) const
|
||||
{
|
||||
auto* region = region_from_vaddr(process, vaddr);
|
||||
return region && region->is_stack();
|
||||
auto* region = user_region_from_vaddr(const_cast<Process&>(process), vaddr);
|
||||
return region && region->is_user_accessible() && region->is_stack();
|
||||
}
|
||||
|
||||
bool MemoryManager::validate_user_read(const Process& process, VirtualAddress vaddr) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue