Skip to content

fix(net): reject unwritable resolver error outputs - #14250

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
johnohhh1:fix/net-resolver-error-guest-pointer
Nov 2, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
johnohhh1:fix/net-resolver-error-guest-pointer

Conversation

@johnohhh1

Copy link
Copy Markdown
Contributor

What

sceNetResolverGetError previously wrote the resolver status through a raw guest pointer after validating the resolver ID. A non-null, unmapped output pointer crashed the host. Use the existing checked guest write and return EFAULT when the copy fails. Preserve EINVAL for null output and EBADF for an unknown resolver.

Add an unmapped-output regression beside the existing resolver error tests. The console's exact error for this pointer remains unmeasured and is recorded in libSceNet technical debt.

Tested

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

@github-actions

github-actions Bot commented Nov 1, 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 5836 core/libs/prx/libSceNet/Export.cpp
core/libs/tests/GuestSceNet.cpp
docs/dev/debt/libSceNet.md
PR 9948 core/libs/prx/libSceNet/Export.cpp
core/libs/tests/GuestSceNet.cpp
docs/dev/debt/libSceNet.md
PR 12104 docs/dev/debt/libSceNet.md
PR 12682 core/libs/prx/libSceNet/Export.cpp
PR 12683 core/libs/prx/libSceNet/Export.cpp
core/libs/tests/GuestSceNet.cpp
docs/dev/debt/libSceNet.md
PR 12688 core/libs/prx/libSceNet/Export.cpp
PR 12700 core/libs/prx/libSceNet/Export.cpp
PR 12918 core/libs/prx/libSceNet/Export.cpp
docs/dev/debt/libSceNet.md
PR 12965 core/libs/prx/libSceNet/Export.cpp
PR 14212 docs/dev/debt/libSceNet.md
PR 14213 core/libs/prx/libSceNet/Export.cpp
core/libs/tests/GuestSceNet.cpp
docs/dev/debt/libSceNet.md
PR 14310 core/libs/prx/libSceNet/Export.cpp

@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.

Reviewed — looks good

The checked guest-memory write preserves the existing null-argument error and returns a bounded error for an unwritable non-null output; the console behavior for that latter case remains explicitly unmeasured.

What I ran

Reviewed head 98991c19d81502e3af6d24e8e13d95d834acc4a4 against base 8728104b26178cd05433390b79d3e71fde7a2b1c; the PR is open and its merge preview is clean against current main (ad4854ce62584b3438576786299c88e79d2e8601). Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0, Git 2.39.5.

git diff --check 8728104b26178cd05433390b79d3e71fde7a2b1c...98991c19d81502e3af6d24e8e13d95d834acc4a4
python3 tools/check_conventions.py --base 8728104b26178cd05433390b79d3e71fde7a2b1c --head 98991c19d81502e3af6d24e8e13d95d834acc4a4 --title 'fix(net): reject unwritable resolver error outputs' --body /tmp/anyps5-pr-precheck-14250/pr-body.md
python3 tools/pr_abi_audit.py --base 8728104b26178cd05433390b79d3e71fde7a2b1c --head 98991c19d81502e3af6d24e8e13d95d834acc4a4 --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-review-14250 --json core/libs/prx/libSceNet/Export.cpp core/libs/tests/GuestSceNet.cpp docs/dev/debt/libSceNet.md
python3 tools/pr_stack_check.py 14250 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-14250/stack

Results

Check Result
Diff whitespace Passed; no output (empty diff-check output).
Conventions and PR template Passed.
Export/ABI audit Passed with one unrelated lexical warning: RunNetThread has no header declaration. The changed resolver export had no finding.
Test-quality heuristic Warning only: it did not find the C++ test path literally in CMake; the test is included via the repository's generated test source registration. This is a heuristic false positive, not a test failure.
Current-base stack/merge preview Passed; clean against current main.
Hosted CI on this head Windows, conventions, labels, intake, report, library-portability, and eligibility passed. Linux and specialized jobs were skipped.
Build / local C++ test Not run.
Raw output excerpts
All conventions checks passed.
{"status":"passed_with_warnings","findings":[{"symbol":"RunNetThread","kind":"public-declaration-not-found","message":"No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface."}]}
{"findings":[{"path":"core/libs/tests/GuestSceNet.cpp","line":1,"kind":"possible-unregistered-cpp-test","message":"Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."}],"negative_control_candidates":[]}

Findings

Blocking

None found in the reviewed change.

Non-blocking

The PR documents that the console's result for a non-null but unwritable status pointer is unmeasured. AnyPS5 now returns EFAULT after a checked guest write fails, while the existing null check still returns EINVAL and unknown resolver IDs still return EBADF. That is a clearly scoped host-safety behavior; no console equivalence is claimed.

Sources

Not verified

No local build or C++ test execution; the exact-head C++ test binary was not available. Linux and specialized hosted jobs were skipped. No console run was performed, so the behavior of an unwritable output on PS5 remains unknown.

@maskym

maskym commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 98991c19d8, merged alone into main e0caf13600 (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

guest_sce_net, the test this PR extends, passes 3 of 3 runs. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@oneandonlydean oneandonlydean self-assigned this Nov 2, 2026
@oneandonlydean
oneandonlydean merged commit c43de86 into boykopovar:main Nov 2, 2026
12 checks passed
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.

4 participants