fix(libSceSaveData.native): validate directory name in sceSaveDataBackup #12644
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12644"
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-28T23:52:37Z.
What
sceSaveDataBackup(core/libs/prx/libSceSaveData.native/Export.cpp), returningSAVE_DATA_ERROR_PARAMETER(0x809f0001) for unterminated names, empty names,.,.., or names containing path delimiters (/,\,:), matching the behavior ofsceSaveDataMount3,sceSaveDataDelete, andsceSaveDataConvert.sceSaveDataBackupinExport.cppperdocs/dev/CONVENTIONS.md.sceSaveDataBackupdirectory name parameter validation indocs/dev/debt/libSceSaveData.native.mdkeeping the entry under the 1,000-character limit.core/libs/tests/GuestSaveDataMountStatus.cppto verify rejection of invalid directory names ("",".","..","a/b","a\b","c:d"), unterminated names, and successful queuing and retrieval of valid backup events throughsceSaveDataGetEventResult.Tested
guest_savedata_mount_status_testspassing all assertions (0 failures).python tools/check_conventions.py --base upstream/main --head HEAD(all conventions checks passed 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 adriadam10 on 2026-10-29T00:26:45Z.
Review: CHANGES_REQUESTED
Thanks for the PR. One blocking point:
core/libs/prx/libSceSaveData.native/Export.cpp:288-295: the PR says this matchessceSaveDataMount3/Delete/Convert, but for Backup neither reference validates the name: KytyPS5libSaveData.cpp:1261and shadPS4savedata.cpp:539only check null pointers and queue the event. The SDK 12.000 page cited in the debt entry documentssceSaveDataMount3, not Backup (there is no backup page in that repo). ReturningSAVE_DATA_ERROR_PARAMETERwhere both references return OK is a behaviour change with no source.docs/dev/debt/libSceSaveData.native.md:26: the entry says the Backup behaviour matches the SDK reference and KytyPS5; for Backup it does not, so it must not claim that.What would fix it: cite a source that shows Backup rejects these names, or keep only the part that is needed regardless of any source (the unterminated name, which would otherwise copy
dir_namewithout a terminator check), and say in the debt entry that the rest is unverified. Please keep the test changes that match whatever stays.