mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Kernel: Ptrace should not assert on poke in non-mapped tracee memory
This commit is contained in:
parent
9bf02c32c0
commit
02ef3f6343
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ KResult Process::poke_user_data(Userspace<u32*> address, u32 data)
|
|||
ProcessPagingScope scope(*this);
|
||||
Range range = { VirtualAddress(address), sizeof(u32) };
|
||||
auto* region = find_region_containing(range);
|
||||
ASSERT(region != nullptr);
|
||||
if (!region)
|
||||
return KResult(-EFAULT);
|
||||
if (region->is_shared()) {
|
||||
// If the region is shared, we change its vmobject to a PrivateInodeVMObject
|
||||
// to prevent the write operation from changing any shared inode data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue