feat(libSceShellUIUtil): validate launch parameters and uri buffer capacity #15026

Closed
Elma7e wants to merge 1 commit from upstream-pr/15026 into main
Elma7e commented 2026-11-02 10:51:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Elma7e on 2026-11-02T10:51:35Z.


What

Implement parameter structure validation for sceShellUIUtilLaunchByUri, sceShellUIUtilGetAppUrl, and sceShellUIUtilLaunchTask in libSceShellUIUtil. Wire CMakeLists.txt target with Windows unwind configuration, add unit test GuestShellUIUtil, and update technical debt documentation.

Tested

  • Host OS: Ubuntu 26.04.1 LTS (Linux x86_64)
  • Compiler: GCC 15.2.0 (-std=c++20 -O2)
  • Execution & Runtime: Standalone test binary compiled and executed with exit code 0 (elapsed < 0.05s)
  • Conventions Check: Ran python3 tools/check_conventions.py --base upstream/main (0 errors)

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5119089398 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15026). Originally posted by [Elma7e](https://github.com/Elma7e) on 2026-11-02T10:51:35Z. --- ### What Implement parameter structure validation for sceShellUIUtilLaunchByUri, sceShellUIUtilGetAppUrl, and sceShellUIUtilLaunchTask in libSceShellUIUtil. Wire CMakeLists.txt target with Windows unwind configuration, add unit test GuestShellUIUtil, and update technical debt documentation. ### Tested - **Host OS:** Ubuntu 26.04.1 LTS (Linux x86_64) - **Compiler:** GCC 15.2.0 (-std=c++20 -O2) - **Execution & Runtime:** Standalone test binary compiled and executed with exit code 0 (elapsed < 0.05s) - **Conventions Check:** Ran python3 tools/check_conventions.py --base upstream/main (0 errors) ### Checklist - [x] Based on current main; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation .md files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
mashingaan commented 2026-11-02 11:34:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mashingaan on 2026-11-02T11:34:55Z.

Review: CHANGES_REQUESTED


At head 9fe4fac23b, sceShellUIUtilLaunchByUri checks only whether parameter is null, then reads parameter->size directly. A non-null but unreadable guest pointer can fault the emulator host before the guest receives an error. Please copy the fixed-size header with GuestCopyIn_nid_no_patch and return the appropriate guest fault result when the copy fails, with a focused inaccessible-pointer case. The current tests only cover null and undersized valid host objects, so they do not exercise this boundary.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5735927264 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15026#pullrequestreview-5735927264). Originally posted by [mashingaan](https://github.com/mashingaan) on 2026-11-02T11:34:55Z. **Review:** CHANGES_REQUESTED --- At head 9fe4fac23b8b225460f2f9ab6c84eed5ce713119, sceShellUIUtilLaunchByUri checks only whether parameter is null, then reads parameter->size directly. A non-null but unreadable guest pointer can fault the emulator host before the guest receives an error. Please copy the fixed-size header with GuestCopyIn_nid_no_patch and return the appropriate guest fault result when the copy fails, with a focused inaccessible-pointer case. The current tests only cover null and undersized valid host objects, so they do not exercise this boundary.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15026
No description provided.