fix(libSceLibreSsl3): copy EC ASN.1 guest pointers safely #22283

Merged
Gruzzberry merged 1 commit from upstream-pr/22283 into main 2026-11-17 12:51:07 +00:00
Gruzzberry commented 2026-11-17 11:16:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gruzzberry on 2026-11-17T11:16:18Z.


What

sceHttpGetCookie: the cookie output buffer and the required out-param were written directly through guest pointers. They are now built host-side and written with HttpGuest::CopyOut / guestWrite; a failed copy returns ERROR_INVALID_VALUE, as the other cookie exports do. The bytes written for valid pointers are unchanged. Found by tools/guest_pointer_audit.py libSceHttp.

Tested

Syntax check only: g++ -std=c++20 -fsyntax-only on Cookies.cpp (MinGW GCC 15.2) with -Icore -Icore/libs -Icore/libs/prx -Iinclude compiled with no errors. Submodules are not initialised, so no full build and no runtime test. tools/check_conventions.py --base upstream/main passed. Duplicate check: a script comparing against the changed files of every open PR found none touching this file.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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 (attach them to this PR)
  • 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

🤖 Generated with Claude Code
es

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5355800421 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22283). Originally posted by [Gruzzberry](https://github.com/Gruzzberry) on 2026-11-17T11:16:18Z. --- ### What `sceHttpGetCookie`: the cookie output buffer and the `required` out-param were written directly through guest pointers. They are now built host-side and written with `HttpGuest::CopyOut` / `guestWrite`; a failed copy returns `ERROR_INVALID_VALUE`, as the other cookie exports do. The bytes written for valid pointers are unchanged. Found by `tools/guest_pointer_audit.py libSceHttp`. ### Tested Syntax check only: `g++ -std=c++20 -fsyntax-only` on `Cookies.cpp` (MinGW GCC 15.2) with `-Icore -Icore/libs -Icore/libs/prx -Iinclude` compiled with no errors. Submodules are not initialised, so no full build and no runtime test. `tools/check_conventions.py --base upstream/main` passed. Duplicate check: a script comparing against the changed files of every open PR found none touching this file. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [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 🤖 Generated with [Claude Code](https://claude.com/claude-code) es 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!22283
No description provided.