feat(libSceNpGameIntent): recover sceNpAppLauncherLaunchApp validation #10573
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10573"
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 akkadbakkad89 on 2026-10-24T10:36:16Z.
What
Recovers
sceNpAppLauncherLaunchApp(NIDGbayQ7DO8jA, exported bylibSceNpGameIntenton 4.03 firmware) from a decryptedlibSceNpGameIntent.sprx: signature(int32_t, const char*, const char*),0x80553A02while the app launcher is uninitialized,0x80553A04when the second argument is null/empty or the optional third argument exceeds 0x2000 bytes (strnlen(0x2001)bound in firmware).sceNpAppLauncherInitialize/sceNpAppLauncherTerminatenow track the flag that gate checks. The launch itself still throws: firmware tail-calls an internal launch through an extra context and remaps0x805538xxerrors into0x80553Axx; recorded indocs/dev/debt/libSceNpGameIntent.md.Tested
Windows 11 MinGW build:
libSceNpGameIntent.prxcompiles and links. Validation disassembled fromlibSceNpGameIntent.sprx(firmware 4.03, function at 0x910): init guard byte,test rdx,rdx/cmovnedefault-string select for arg3,test rsi,rsi+cmp byte [r14],0empty-string rejection for arg2,strnlen(arg3,0x2001)==0x2001length bound, error remap0x80553802->0x80553A02,0x80553803->0x80553A03,0x80553804->0x80553A04, other nonzero->0x80553A00.sceNpAppLauncherLaunchAppis imported by PPSA20397 (Assassin's Creed Shadows) fromlibSceNpGameIntent.prx; no GameIntent guest test exists upstream (the library has no CMakeLists/test target).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)GbayQ7DO8jAfrom libSceNpGameIntent)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T10:38:27Z.
Review: CHANGES_REQUESTED
There is an unbounded read in the recovered length check. The PR says firmware uses
strnlen(arg3, 0x2001), but this implementation callsstd::strlen(arg3)and only then compares the result with0x2000. A non-terminated buffer of 0x2001 bytes can make the host read beyond the firmware’s validation window (or fault while searching for a terminator) instead of returning0x80553A04. Please use the same bounded check—reject whenstrnlen(arg3, 0x2001) == 0x2001—and add a regression with a 0x2001-byte non-terminated buffer. Also,AppLauncherInitialized()is a process-global plainboolread and written by exported functions; concurrent initialize/terminate/launch calls create a C++ data race. Please make this state atomic or protect the lifecycle/check with a mutex and cover the intended ordering.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T11:51:38Z.
Review: CHANGES_REQUESTED
The current head still has both issues from my earlier review. The recovered firmware path is
strnlen(arg3, 0x2001) == 0x2001, but the implementation calls unboundedstd::strlenbefore checking 0x2000; a non-terminated 0x2001-byte input can read beyond the firmware validation window or fault instead of returning invalid argument. Please use the same bounded check and add a non-terminated 0x2001-byte regression. Also, the plain static bool is concurrently read by LaunchApp and written by Initialize/Terminate, which is a C++ data race. Please use an atomic or synchronization and add coverage for the intended lifecycle concurrency. Hosted structural checks pass, but product/platform jobs are skipped, so the reported Windows compile is the only build evidence currently listed.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T12:21:36Z.
Review: APPROVED
The revised validation now uses a bounded over the firmware's 0x2001-byte window, and the initialization state is atomic. The new tests cover pre-init/post-terminate behavior, null/empty required input, an unterminated 0x2001-byte buffer, the 0x2000-byte boundary reaching the unimplemented launch path, and concurrent lifecycle calls. I found no remaining blocker in this diff. Hosted eligibility, conventions, labels, and report checks pass; the platform build/test jobs were skipped by the workflow gate, so I have not independently reproduced the contributor-reported Windows test run.