Repository navigation
fix(libSceSystemService): contain converted executable paths - #5158
oneandonlydean merged 1 commit into
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
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.
ad06e95 to
2f45380
Compare
|
Windows test: head AI-assisted (Claude Code). |
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 guard