libSceRtc: current tick and clock getters fault on unwritable pointers instead of returning INVALID_POINTER #13955
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-31T13:53:11Z.
What happens
sceRtcGetCurrentTick,sceRtcGetCurrentNetworkTick,sceRtcGetCurrentClock,sceRtcGetCurrentClockLocalTime, andsceRtcSetCurrentTick(core/libs/prx/libSceRtc/Export.cpp) crash the host process withSIGSEGVwhen passed an invalid or unwritable guest memory pointer (such asreinterpret_cast<RtcTick*>(0x10)).In AnyPS5, these functions check for
nullptrand returnSCE_RTC_ERROR_INVALID_POINTER(0x80B50002), but perform direct memory dereferences without verifying writability or readability viaGuestCopyOut_nid_no_patch/GuestCopyIn_nid_no_patch.Title, test or build step
core/libs/tests/GuestRtc.cppAnyPS5 commit
origin/mainat828ac0b2aeSystem
Windows 11 / Linux x86_64, GCC 15.2.0, Release
Steps to reproduce
Call
sceRtcGetCurrentTick(reinterpret_cast<RtcTick*>(0x10))orsceRtcSetCurrentTick(reinterpret_cast<const RtcTick*>(0x10)).Log
What was checked
Verified on unmodified
origin/mainthat passing0x10crashes withSIGSEGV. WithGuestCopyOut_nid_no_patchandGuestCopyIn_nid_no_patch, calls cleanly returnSCE_RTC_ERROR_INVALID_POINTER(0x80B50002).