Repository navigation
fix(libSceNet): guard recvfrom sender outputs before receiving - #7186
Merged
oneandonlydean merged 1 commit intoOct 18, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
AI-assisted: OpenAI Codex. Windows native checks: 17 related CTests and 10 regression repetitions pass. No affected title verified.
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sceNetRecvfromopens the receive-data buffer for host writes but writes the sender address and its length without those guards. A logically read-only sender-address mapping on Windows causes an unhandled0xc0000005write inlibSceNet.prxinstead ofEFAULT.Guard the length output before the unbound-socket early return, and the datagram address before receiving. Bound the address guard by caller capacity and native family size (16 bytes for IPv4, 28 for IPv6). Zero-capacity addresses need no write permission; stream address bytes remain untouched. Refused outputs leave the queued datagram available.
The existing watched-socket fixture now covers read-only address and length outputs, unchanged metadata and packet recovery, zero address capacity, and an IPv4 output ending at a writable page followed by a read-only page despite a larger supplied capacity.
No affected title is confirmed: this is a synthetic native regression. #5930 concerns
sceNetRecvmsgmessage/vector guards, not thesesceNetRecvfromsender outputs. The current open #5836 and #6926 do not add these guards. No new PR implementing them was found.Tested
Windows x64, Intel Core i7-8700, supported WinLibs GCC 15.2.0 r7 UCRT, CMake 4.4.4, Release,
BUILD_TESTING=ON, bundled dependencies.Refreshed on 2026-10-17 to main
84b0d2f24863d1e88105ada295cc346f720c1a6a. Exact tested treeba773e46de2fa81663009f4fca80f348201c3b64. The rebase preserves main's new unbound-socket wait; the length guard also covers that path's length write.guest_socket_host_write_tests,guest_datagram_receive_tests,guest_sce_net_testson this base.82ddae75b6761757f3d3ba9c0723647469270f76: adding the read-only-address case without production changes causes0xc0000005at the sender-address write. The original fixture without that case passed there. This negative control was not repeated on the new base.git diff --checkpass.pr_overlap.pycould not run becauseghis unavailable; overlap was checked through the GitHub connector and the relevant open PR diffs.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)net-receive-address-evidence-20261017.zip