libNet: honour the option mask in sceHttpUriBuild #1069
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1069
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1069/head"
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?
@rohit267 on GitHub · 2026-10-05 13:15 UTC · original
rohit267:fix/http-uri-build-option→main· +112 −31 · 2 files · 2 commits · merged 2026-10-05 17:31 UTC
sceHttpUriBuildtakes anoptionmask (SCE_HTTP_URI_BUILD_WITH_*) that selects which components of theSceHttpUriElementgo into the output.HttpUriBuildlogs it and ignores it, so every call returns the full URL.Black Myth: Wukong (PPSA23226) calls it with SCHEME only and requires "https://" or "http://" back before it starts an HTTP request. The full URL fails that check, the request starter returns false, and the caller's "run on game thread and wait" helper returns early with its task still queued. The task holds by-reference captures of a stack frame that is already gone, and about 70 seconds into boot the game thread runs it and faults (null read at eboot+0x59662f). I chased this through guest register dumps, a guest breakpoint tracer and the game's own disassembly before finding that the URL check was the trigger.
With the mask honoured, the game gets past that point and reaches its title cinematic and menu.
Changes:
HttpUriBuildbuilds only the components selected byoption: SCHEME 0x01, HOSTNAME 0x02, PORT 0x04, PATH 0x08, USERNAME 0x10, PASSWORD 0x20, QUERY 0x40, FRAGMENT 0x80.Testing:
TestBuildHonoursOptionintests/HttpUriParseTests.cppcovers scheme-only, hostname, port, path, and the 0xff and 0 masks.http_uri_parsepasses.db17585): 51 of 52 pass; the one failure,shader_recompiler_compute, fails without this change too.72e4989: both changed files compile cleanly against current headers. I have not re-run the full suite on72e4989.@coderabbitai[bot] on GitHub · 2026-10-05 13:21 UTC · original
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
508c01aa-de0e-4be6-9c6c-63d9b9199cde📥 Commits
Reviewing files that changed from the base of the PR and between
72e4989b1eand6f3930c85d.📒 Files selected for processing (2)
src/libs/libNet.cpptests/HttpUriParseTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
HttpUriBuildnow uses the low eight option bits to select URI components. A zero mask selects all components. Scheme-only output for hierarchical URIs includes//; a port without a selected hostname is emitted without a colon. Tests cover individual component bits, combinations, and the full-URL behavior for masks0and0xff.Suggested reviewers:
elijaowo,nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
6f393The option-mask change is mergeable after normal checks. The full test suite has not been rerun since the rebase.
Security Architecture Review
Security architecture risk: 🔵 Low · up to
6f393The change is confined to URI construction and does not add network operations or privileges. Risk is limited, but downstream destination and authentication behavior cannot be fully assessed without the guest callers.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
sceHttpUriBuildnow honors the option mask.Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.