libkernel: system version queries fault on invalid memory pointers #13548
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-30T18:02:22Z.
Describe the bug
In
core/libs/prx/libkernel/System/src/SystemConfiguration.cpp,sceKernelGetSystemSwVersion_nid_postfix,sceKernelGetSystemExVersion,sysKernelGetLowerLimitSysexVersion_nid_postfix, andsysKernelGetLowerLimitUpdVersion_nid_postfixdirectly dereference caller-provided guest memory pointers. Passing an unmapped or unwritable pointer causes an unhandled host segmentation fault (SIGSEGV) instead of returningSCE_KERNEL_ERROR_EFAULT(or14).Reproduction
Call
sysKernelGetLowerLimitUpdVersion_nid_postfix(reinterpret_cast<std::uint32_t*>(0x10)). The host terminates immediately withSIGSEGV.Expected behavior
Invalid memory pointers should be validated using
GuestCopyOut_nid_no_patch/GuestCopyIn_nid_no_patchand returnSCE_KERNEL_ERROR_EFAULT(or14).I am implementing this fix along with test coverage in
core/libs/tests/GuestSystemConfiguration.cppand will open a PR.