Skip to content

fix(libSceHttp2): return invalid value from sceHttp2Init for a maximum of 0 requests as measured in a PS5 payload - #11730

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
ionut27001:fix/http2-init-zero-concurrency
Oct 28, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
ionut27001:fix/http2-init-zero-concurrency

Conversation

@ionut27001

@ionut27001 ionut27001 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

sceHttp2Init threw for any maximum concurrent request count of 0 or below.

In a payload process on a PS5 (firmware 12.70), sceHttp2Init from /system/common/lib/libSceHttp2.sprx returned 0x817B11FE (invalid value) for a count of 0. The call used a valid libnet pool, a valid libssl context and a 64 KiB pool; a count of 1 with those same arguments returned 0x817B121D (pool too small).

This change returns 0x817B11FE for a count of 0. A negative count still throws: -1 with the 64 KiB pool produced no result before the runner's 60-second timeout, so it either hung or ended the process. In a second run, a count of 1 with a 1 MiB pool also produced no result, and the later counts in that run were not reached, so the accepted path and the smallest accepted pool are not measured either. In both runs the module's start routine returned 8, not 0, which may be related. The debt entry records these gaps.

Measured log (case lines, first run, 64 KiB pool, payload process, firmware 12.70):

case load path=/system/common/lib/libSceSsl.sprx ret_ok=1 start_result=0
case load path=/system/common/lib/libSceHttp2.sprx ret_ok=1 start_result=8
case resolve pool=1 pool_destroy=1 ssl_init=1 ssl_term=1 init=1 term=1
case net_pool ret_ok=1
case ssl_init ret_ok=1
case init max=1 ret=0x817b121d ok=0
case init max=0 ret=0x817b11fe ok=0

The next call, with a count of -1, produced no further output.

Overlaps: no open PR changes sceHttp2Init. The 0x817B11FE value is written inline, as the pool-size check in the same file does, so this PR adds no constant that #10536 or #11470 also define. git merge-tree shows no conflict between this head and #10536, #11630, #11627, #11617, #11616, #11611, #11586, #11575 or #11145. #11470 already conflicts with main in all three files this PR touches, and #11134 and #9598 already conflict with main; this PR does not change which of their files conflict.

Tested

Windows 11, WinLibs GCC 15.2.0, Release, on main 4291b04:

  • With this change: guest_http2 passes twice. It now checks that a count of 0 returns 0x817B11FE and that -1 throws.
  • Revert check: with Export.cpp from main, the test aborts (0xc0000409), because a count of 0 throws.

Not tested on Linux, nor with a title.

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 (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

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The measured zero-count result and the code change are clearly scoped, and the debt entry records the unmeasured negative-count and valid-pool cases. There is one repository-policy blocker: #11470 and #10536 are still open and each has a content conflict with this head (git merge-tree confirms #11470 conflicts in Export.cpp and CMakeLists.txt, and #10536 conflicts in Export.cpp and the debt file). The PR description identifies the overlaps but does not record an agreed merge order or a Depends on entry. CONTRIBUTING requires that coordination. Please agree with the affected authors on the order and update the checklist; I did not find another code blocker in this pass.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 11470 core/libs/prx/libSceHttp2/Export.cpp
core/libs/tests/GuestHttp2.cpp
docs/dev/debt/libSceHttp2.md
PR 11611 core/libs/prx/libSceHttp2/Export.cpp
core/libs/tests/GuestHttp2.cpp
docs/dev/debt/libSceHttp2.md
PR 11922 docs/dev/debt/libSceHttp2.md
PR 12456 core/libs/prx/libSceHttp2/Export.cpp
core/libs/tests/GuestHttp2.cpp
docs/dev/debt/libSceHttp2.md

@ionut27001

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks. Rather than ask for a merge order, I removed the overlap:

git merge-tree now finds no conflict between this head and #10536. #11470 already conflicts with main in every file this PR touches, so it needs a rebase either way. Depends on stays none. guest_http2 still passes twice, and with Export.cpp from main it still aborts.

@ionut27001
ionut27001 force-pushed the fix/http2-init-zero-concurrency branch from 97c59c6 to c63b462 Compare October 27, 2026 07:00
@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@adriadam10
adriadam10 force-pushed the fix/http2-init-zero-concurrency branch from c63b462 to e694001 Compare October 28, 2026 09:08
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 28, 2026 09:17

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit 3b362ba into boykopovar:main Oct 28, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff against the measured PS5 log: a count of 0 returns 0x817B11FE, a negative count still throws, guest_http2 covers both (the 0 case threw before), and the debt entry lists the unmeasured cases. The overlap raised earlier is gone, since the PR no longer adds a constant or touches the lines #10536 edits.

Added one commit: sceHttp2Init now uses the existing ERROR_INVALID_VALUE instead of the inline literal. Build and ctest on the rebased head pass; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants