Repository navigation
fix(libSceNet): refuse resolver timeouts below one second as firmware 13.42 does - #13850
Merged
adriadam10 merged 1 commit intoNov 1, 2026
Merged
Conversation
… 13.42 does sceNetResolverStartNtoa refuses a timeout from 1 to 999999 with EINVAL before the resolver is looked up, and takes 0 as 1000000, as a run of firmware 13.42's module shows.
Contributor
Author
|
Closing for now to stay within the 20-open-PR limit (#13848 was closed by it). The branch and its Windows/WSL2 results stay as they are, and I'll reopen this once one of my open pull requests is merged or closed. |
Contributor
Author
|
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.
|
Collaborator
|
Checked the diff against @BunnyFl's 13.42 rows: timeouts 1 and 999999 now fail with |
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
sceNetResolverStartNtoanow refuses a timeout from 1 to 999999 withEINVAL, before the resolver is looked up. A timeout of 0 is still accepted, since the module replaces it with 1000000.This is what @BunnyFl found running firmware 13.42's module:
0x7fffffffwent on to the resolver check.That comment noted the rule wasn't modelled on #9727, and
mainstill refused only negative timeouts. The rejection sits on the line that already returnsEINVALfor a negative timeout or retry and for unknown flag bits, so the order among them doesn't matter.The debt entry gains a sentence on the rule. It still says that the timeout and retry count aren't applied to the host lookup. The same comment's note on null hostname and address order after the resolver check isn't fully specified for a valid id, so it's left alone. No function changes count.
GuestSceNet.cppchecks, on a destroyed resolver:EINVAL;0x7fffffffreach the unknown-resolverEBADF.Tested
Windows 11 (WinLibs MinGW-w64 GCC 15.2.0 UCRT r7, CMake 4.3.1, Ninja 1.13.2) and Ubuntu 24.04 on WSL2 (GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1), both with the head ce09309 merged into
mainbeb7ce3.Export.cpporGuestSceNet.cpp.ctest -R "guest_sce_net|guest_net": 14 of 14 pass on both hosts.guest_sce_netpasses 3 of 3 on--repeat until-fail:3; it needs no network.mainwith only the test change,guest_sce_netbuilds and then aborts at the timeout-1 row (line 685), wheremainreaches the unknown-resolverEBADF(Windows exit 0xc0000409, Linux SIGABRT).tools/check_conventions.pypasses. Rechecked on reopening againstmainca073ec, which hasn't touched these files since the tested base:git merge-treemerges this cleanly with it and with every open pull request that merges with it, and no open pull request touchessceNetResolverStartNtoa.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)