diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index 66b3c46451..ccc585a511 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -75,7 +75,8 @@ KResult Process::poke_user_data(Userspace 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