fix(libkernel): return EFAULT from sceKernelStat and sceKernelUnlink for a null path #7108
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7108"
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-17T12:01:34Z.
What
sceKernelStatandsceKernelUnlinkthrewstd::invalid_argumentwhen passed a null path, terminating the calling title. In FreeBSD 11,sys_statandsys_unlinkreturnEFAULT(0x8002000ein PS5 errno) when the user path pointer cannot be copied from guest memory.Both entry points now return
0x8002000e(SCE_KERNEL_ERROR_EFAULT) whenpath == nullptrinstead of throwing.Tested
Added unit tests in
core/libs/tests/GuestPosixScalarIo.cpp(guest_posix_scalar_io) verifying thatsceKernelStatandsceKernelUnlinkwith a null path fail with0x8002000ewithout throwing.python tools/check_conventions.py --base origin/mainpassed cleanly with zero findings.Checklist
docs/dev/CONVENTIONS.mddocs/dev/TechnicalDebt.mdImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T12:16:57Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libkernel/File/src/Open.cppcore/libs/tests/GuestPosixScalarIo.cppImported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T13:12:48Z.
Thank you @oneandonlydean for reviewing and merging #7103!
I have rebased #7108 directly onto latest
origin/main(04788b090). As discussed on #7110 and #7113, once #7108 merges, I will immediately update #7110 with the folded changes (combiningsceKernelTruncate,sceKernelUtimes,sceKernelMkdir,sceKernelRmdir, andsceKernelRename) and close #7113 and #7114.Whenever you have a moment, please also check our other green PRs passing all CI checks:
fix(libkernel): return EFAULT from sceKernelWriteThrottlingStatus for a null status) — fixes null status pointer fault on Minecraft Bedrock (PPSA17221, #5744).feat(libs): declare missing RUDP and signaling imports for PPSA31327) — unblocks start-up for Yakuza 0 Director's Cut (PPSA31327, #6722).ci(relinker): run TLS function coverage tests under ASan on Linux) — addresses #7062.fix(libSceAgcDriver): normalize reserved bit 30 in guest buffer descriptors) — addresses #7051.