fix(libSceNet): copy resolver connection flags from guest memory #25747
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25747"
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?
Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-11-22T16:25:33Z.
What
Add focused regression coverage for an unmapped non-null resolver connection passed to
sceNetResolverConnectDestroy. The test verifies the existing validation order and that an unreadable flags byte returnsNET_EFAULT.This is intentionally stacked on #24646, which already contains the same
GuestCopyIn_nid_no_patchguard insceNetResolverConnectDestroyas part of broader socket-option safety work. This branch temporarily carries that guard so the regression can run before #24646 merges. After #24646 lands, this PR should be rebased to remove the duplicate implementation hunk and retain the regression test only.Tested
Windows 11, UCRT MinGW GCC 16.2, Release,
BUILD_TESTING=ON:cmake --build C:/b/net-resolver-destroy-guest-pointer-20261122 --target guest_net_ps4_exports_tests --parallel 4— passedctest --test-dir C:/b/net-resolver-destroy-guest-pointer-20261122 -R '^guest_net_ps4_exports$' --output-on-failure— 1/1 passedcore/libs/prx/libSceNet/Export.cppto the parent while keeping the new assertion;guest_net_ps4_exportscrashed with access violation0xc0000005, reading address0x1e8from connection0x10; restoring the fix returned the test to 1/1 passingmain(788b1afac9daf5129deff879755324bc4799d08e), rebuilt and reran the focused CTest — 1/1 passedgit diff --check HEAD^ HEAD— cleanpython -I tools/check_conventions.py --base HEAD^ --head HEAD— passedChecklist
main; the overlapping implementation is explicitly stacked on #24646 and will be removed after it merges.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-22T16:25:44Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-22T16:26:44Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
fe260d6f20:tools/check_conventions.pypassed.guest_net_ps4_exports_testsbuilt cleanly.guest_net_ps4_exports):core/libs/prx/libSceNet/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T16:51:33Z.
Review: APPROVED
Reviewed — looks good
Nothing in the inspected change blocks merging; the implementation follows established guest-memory read handling and preserves the stated validation order.
What I ran
Reviewed head
fe260d6f209b888b8ce7a3942a1da8bc59ac32f5usingrepo_read.pyto inspect the prepared diff, manifest and changed source ranges. No commands or tests were run; the build and test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The changed files
core/libs/prx/libSceNet/Export.cppandcore/libs/tests/GuestNetPs4Exports.cppwere read at the relevant function and test ranges. Both files listed as reviewed in the manifest were included and inspected. The remaining file contents, test execution, and exact console result for inaccessible resolver objects were not verified.review/files.jsonwas not available; the reader's file listing confirmed both changed files were included.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by throny on 2026-11-22T17:10:35Z.
Review: APPROVED
Review: ✅ correct, I'd merge it
Basis: code read
Checked
sceNetResolverConnectDestroyreads the flags byte atconnection + 0x1D8directly after only a null check, so a bad non-null pointer faults the host. The other connect exports (Abort,Create,Connect) never dereference the pointer.NotImplemented. EFAULT on a failed copy matchessceNetResolverStartAton/Aton6. The existing ENOTINIT, EINVAL and EBADF assertions still pass with a readable record.0x10→ EFAULT assertion faults on main.Findings
none
Suggested action: merge
AI-assisted review (Claude Code) · head
fe260d6f20· basemain23b8772462