Commit Graph

2 Commits

Author SHA1 Message Date
Ethan Barr e41050f71c fix(savedata): reject deleting mounted native saves 2026-10-07 15:13:43 -07:00
Alberto Ruiz 95c1b40e71 fix(savedata): reject invalid directory names in sceSaveDataDelete
sceSaveDataDelete appended the title's directory name to the save root
without any check and passed the result to std::filesystem::remove_all.
"../victim" removed a directory beside the save root, ".." the directory
holding the save root, and an empty name or "." every save. The name
now has to be terminated within its field, non-empty, not "." or "..",
and free of "/", "\" and ":", as sceSaveDataMount3 already requires;
otherwise the call returns SAVE_DATA_ERROR_PARAMETER and deletes nothing.

The native library gains its own CMakeLists.txt, with the same library
definition as the generic one, to register guest_savedata_delete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-02 20:41:43 +02:00