Repository navigation
HLE/net: refuse a WSAConnectByList count the list cannot back - #476
Closed
iloveslopware wants to merge 1 commit into
Closed
iloveslopware wants to merge 1 commit into
iloveslopware wants to merge 1 commit into
Conversation
The count became a &[SocketAddress] of that length before any address was vetted, so one real 16-byte entry with iAddressCount = 0x7FFFFFFF made a ~34 GB slice and read past the allocation as pointers and lengths. A SOCKET_ADDRESS_LIST carries no size to check the count against, so more candidates than any title offers (64) are now refused with WSAEINVAL instead of walked: the call fails closed like every other vetted path in this module, and honest lists still reach the host unchanged. Fixes fxceless#428.
Author
|
Yes — #466 was opened five minutes before this one and covers the same defect more completely: it also refuses a negative |
RecompLive
pushed a commit
to RecompLive/victory-fork
that referenced
this pull request
Nov 25, 2026
…hout-hint Census: deduplicate PE imports without hint
oceansde012
pushed a commit
to oceansde012/victory-gta6
that referenced
this pull request
Nov 25, 2026
…hout-hint Census: deduplicate PE imports without hint (cherry picked from commit 2d8cac2)
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.
WSAConnectByListturnediAddressCountinto a&[SocketAddress]of that length before any address was vetted, so a list holding one 16-byte entry withiAddressCount = 0x7FFFFFFFproduced a ~34 GB slice and read far past the title's allocation as pointers and lengths — undefined behavior beforereachable()could weigh in (#428).A
SOCKET_ADDRESS_LISTcarries no size the count could be checked against, so the count is the title's word alone. More candidates than any title offers (MAX_CONNECT_LIST, 64) are now refused withWSAEINVALand aFALSEreturn — the same fail-closed posture as the rest of this module — while honest lists reach the host unchanged and the vetting loop is untouched.The new test builds a one-entry list whose count claims
i32::MAXand asserts the call returns 0 withWSAEINVALset, refusing before the entries are walked.Fixes #428.
Verification:
cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets --locked -- -D warnings(clang-cl 23.1.5, cross-checked from Linux) passes on default features and on--all-features; this compiles the new test, which then runs in this repo's Windows CI.#[cfg(windows)]-gated, so the Linux build is untouched by construction;main's pre-existing non-Windows test-compile gaps are outside this change and covered by Linux: finish the non-Windows build and tests #449.No formatting-only churn: one const with its rationale, a four-line guard, one test.
Disclosure: written with AI assistance (GLM via OpenCode) — the fix, test, and cross-verification were drafted and run with the tool, following the report in #428. Reviewed and understood by the human submitting it.