fix(libSceSystemService): contain converted executable paths #5158
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5158"
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 AaravMehta-07 on 2026-10-13T13:09:03Z.
What
Keep the resolved secondary converted-executable path lexically beside the running converted executable. Guest paths are split on
/, but Windows also interprets backslashes as separators; a name containing..\can otherwise escape the sibling executable directory after passing the guest-path checks.Check the normalized parent before probing the target or running shutdown callbacks. Keep Unix backslashes as ordinary filename characters and preserve the existing flattened-name conversion and main-executable handling. This is a lexical path-boundary fix, not a claim of complete symlink or filesystem sandboxing.
The Windows regression copies only its own test executable to a unique parent-directory fixture. The probe registers a shutdown callback that exits with code 86 before
StartHostExecutable, so it proves the unsafe path is accepted on baseline without actually launching any outside executable. Child waits are bounded and CTest has a 20-second timeout.Tested
Windows, MinGW-w64 GCC 15.2.0, default bundled-dependency Release full-mode CMake configuration with testing enabled, main
0f2683cb7.libstarget succeeded. Afterward all six focused cases passed in 0.42 seconds, addingpatched_librariesto the five cases above.maind5835a613after upstream's libc error-category change. The complete Windows all-target build andlibstarget succeeded again; all eight post-rebase focused CTests passed in 0.76 seconds, including the new generic-category and Ampr C++ error tests.The full CTest suite, PS5 hardware and commercial titles were not run. No performance claim.
Related Work
#5083 changes the outer LoadExec implementation but leaves
PrepareLaunchunchanged. This fix changes the path-preparation helpers, not that export's body. The complete hunk/export/new-file overlap scanner reports no overlap, including with #5083. The initial broad source-file overlap concern was therefore cleared after exact checking. Neither change semantically requires the other; I will rebase if later changes introduce a conflict.Checklist
main; no other open PR implements this path-boundary guardImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T13:12:26Z.
Review: COMMENTED
I reviewed the path construction and regression. The guard runs after converting the guest path but before checking the target or running shutdown callbacks, and the Windows test exercises the
..\\separator case while preventing an outside executable from starting. The change is explicitly scoped to lexical containment, and the reported Windows focused tests/full build cover the new path. I did not find a blocking issue in this diff.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T14:57:00Z.
Windows test: head
2f453805amerged onto currentmainef42c5f2a, together with 9 other open pull requests in one build (the merges were conflict-free); a failure would have been bisected per PR. Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest for the tests this change adds or touches: guest_system_service_path_boundary passed;python tools/check_conventions.py --base upstream/mainpassed for the combined tree. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).