net: bound the title's count in WSAConnectByList (#428) #472

Closed
github-bot wants to merge 1 commit from gh-pr/472/head into gh-pr/472/base
Owner

@⁠JamesCicada on GitHub · 2026-11-25 01:20 UTC · original
JamesCicada:fix/428-connect-by-list-bound → main · +81 −9 · 1 files · 1 commits · closed without merging

The shim built a slice from the SOCKET_ADDRESS_LIST's own count, with no upper bound, before vetting the entries: a list that claimed more entries than it held made the walk read past it.

A count over 64 (our limit; a title passes the few addresses one name resolved to) is now refused with WSAEINVAL before any entry is read. Entries are read one at a time, unaligned, stopping at the first one that is not loopback, and no slice is made over title memory.

Tests: a mixed loopback/off-machine list is still refused with WSAENETUNREACH; a count of 65, and i32::MAX over one real entry, are refused with WSAEINVAL.

**@⁠JamesCicada** on GitHub · 2026-11-25 01:20 UTC · [original](https://github.com/fxceless/victory-fork/pull/472) `JamesCicada:fix/428-connect-by-list-bound` → `main` · +81 −9 · 1 files · 1 commits · closed without merging The shim built a slice from the SOCKET_ADDRESS_LIST's own count, with no upper bound, before vetting the entries: a list that claimed more entries than it held made the walk read past it. A count over 64 (our limit; a title passes the few addresses one name resolved to) is now refused with WSAEINVAL before any entry is read. Entries are read one at a time, unaligned, stopping at the first one that is not loopback, and no slice is made over title memory. Tests: a mixed loopback/off-machine list is still refused with WSAENETUNREACH; a count of 65, and i32::MAX over one real entry, are refused with WSAEINVAL.
The shim built a slice from the SOCKET_ADDRESS_LIST's own count, with no
upper bound, before vetting the entries: a list that claimed more entries
than it held made the walk read past it.

A count over 64 (our limit; a title passes the few addresses one name
resolved to) is now refused with WSAEINVAL before any entry is read.
Entries are read one at a time, unaligned, stopping at the first one that
is not loopback, and no slice is made over title memory.

Tests: a mixed loopback/off-machine list is still refused with
WSAENETUNREACH; a count of 65, and i32::MAX over one real entry, are
refused with WSAEINVAL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:44:07 +00:00
github-bot closed this pull request 2026-11-26 03:44:07 +00:00
Author
Owner

@⁠kaayzouee on GitHub · 2026-11-25 01:41 UTC · original

Is this a duplicate of #466?

Both bound the WSAConnectByList count to 64 and read candidates individually.

This is an automated message. If you believe it is incorrect, please reply with the relevant technical differences.

**@⁠kaayzouee** on GitHub · 2026-11-25 01:41 UTC · [original](https://github.com/fxceless/victory-fork/pull/472#issuecomment-7149839919) Is this a duplicate of #466? Both bound the WSAConnectByList count to 64 and read candidates individually. This is an automated message. If you believe it is incorrect, please reply with the relevant technical differences.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.