WSAConnectByList reads at most 64 candidates and refuses a negative c… #521

Open
github-bot wants to merge 1 commit from github-bot/gh-521 into main AGit
Owner

@⁠pug205gti6 on GitHub · 2026-11-25 01:58 UTC · original
pug205gti6:pr/466-wsaconnect → main · +95 −9 · 1 files · 1 commits · open

…ount

The count of a SOCKET_ADDRESS_LIST came from the title and became the length of a slice with no upper bound, so a count past the entries present read memory after the list as addresses (#428). A count below zero or above 64 now fails with WSAEINVAL before anything after the count is read and without the host seeing the list; the entries are read one by one with read_unaligned instead of through a slice.

**@⁠pug205gti6** on GitHub · 2026-11-25 01:58 UTC · [original](https://github.com/fxceless/victory-fork/pull/521) `pug205gti6:pr/466-wsaconnect` → `main` · +95 −9 · 1 files · 1 commits · open …ount The count of a SOCKET_ADDRESS_LIST came from the title and became the length of a slice with no upper bound, so a count past the entries present read memory after the list as addresses (#428). A count below zero or above 64 now fails with WSAEINVAL before anything after the count is read and without the host seeing the list; the entries are read one by one with read_unaligned instead of through a slice.
The count of a SOCKET_ADDRESS_LIST came from the title and became the
length of a slice with no upper bound, so a count past the entries
present read memory after the list as addresses (#428). A count below
zero or above 64 now fails with WSAEINVAL before anything after the
count is read and without the host seeing the list; the entries are read
one by one with read_unaligned instead of through a slice.

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

@⁠Revens2 on GitHub · 2026-11-25 07:36 UTC · original

Duplicate of #466: @⁠Frtuchinno opened this patch 41 minutes earlier, and gh pr diff returns the same bytes for both (+95/-9 on 1 file(s), same title).

Please continue in #466 so the review history and any test data stay in one place.
Thanks.

**@⁠Revens2** on GitHub · 2026-11-25 07:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/521#issuecomment-7156052494) Duplicate of #466: @⁠Frtuchinno opened this patch 41 minutes earlier, and `gh pr diff` returns the same bytes for both (+95/-9 on 1 file(s), same title). Please continue in #466 so the review history and any test data stay in one place. Thanks.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/521/head:github-bot/gh-521'
git switch 'github-bot/gh-521'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-521'
git switch 'github-bot/gh-521'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-521'
git switch 'github-bot/gh-521'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-521'
git switch 'main'
git merge --squash 'github-bot/gh-521'
git switch 'main'
git merge --ff-only 'github-bot/gh-521'
git switch 'main'
git merge 'github-bot/gh-521'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.