fix(libSceSaveData.native): validate mount point termination in mount operations #12853
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12853"
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 slopgobblercobbler on 2026-10-29T12:45:37Z.
What
core/libs/prx/libSceSaveData.native/Export.cpp, validate thatSaveDataMountPointcontains a null-terminated string viaisValidMountPointbefore performing slot lookups in mount operations (getMountInfo,getParam,setParam,loadIcon,saveIcon,saveIconByPath,umount2).find_slot_by_mount_pointagainst null pointers and bound trace logging with%.*s.docs/dev/debt/libSceSaveData.native.md(<1,000 characters, leading with divergence statement first).Tested
core/libs/tests/GuestSaveDataMountStatus.cppverify unterminated and terminated mount points across unmounted/mounted saves.guest_savedata_mount_statuspasses 3 of 3 (ctest --repeat until-fail:3); negative control withExport.cppandSaveData.hppreverted tomainconfirmed failing.guest_savedata_mount_statuspasses 3/3, all 7guest_savedata_*tests pass; negative control with source reverted tomainfails 3/3 across all 14 unterminated-point checks.python tools/check_conventions.py --base upstream/main --head HEADpassed with 0 findings.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T14:00:01Z.
Review: COMMENTED
First Linux run of this head (the body and the thread have Windows only).
Ubuntu 26.04, i7-8700, GCC 15.2, Release,
BUILD_TESTING=ON. Headb01e0938b0merged (--no-commit) onto currentmainf91137142e; the merge is clean.guest_savedata_mount_status: passes 3/3.guest_savedata_*tests pass.public_headers: passes.Export.cppandSaveData.hppfrommainand this PR's test kept,guest_savedata_mount_statusfails 3/3: all 14 unterminated-point checks fail (umount2,loadIcon,saveIcon,saveIconByPath,getMountInfo,getParam,setParam, each unmounted and mounted).Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.