mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-03 15:41:57 +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
Notes:
sideshowbarker
2024-07-19 10:31:40 +09:00
Author: https://github.com/awesomekling
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