Repository navigation
Child socket cleanup on TCP window allocation failure - #1372
Open
kstribrnAmzn wants to merge 3 commits into
Open
kstribrnAmzn wants to merge 3 commits into
kstribrnAmzn wants to merge 3 commits into
Conversation
kstribrnAmzn
marked this pull request as ready for review
October 2, 2026 22:16
htibosch
approved these changes
Oct 12, 2026
htibosch
left a comment
Contributor
There was a problem hiding this comment.
Hi @kstribrnAmzn and Ghaith Abdulreda, thank you for this PR.
I always enable hang protection:
#define ipconfigTCP_HANG_PROTECTION ipconfigENABLEand so the other path was "less tested".
Hein
prvTCPSocketCopy() stores a pointer to a new child socket in the listening socket's u.xTCP.pxPeerSocket field, but when prvTCPCreateWindow() fails the IPv4 and IPv6 listen paths free that child through a direct vSocketClose() call that bypasses the vTCPRemoveTCPChild() cleanup. With this change, the reference is cleared before the socket is closed.
kstribrnAmzn
force-pushed
the
childSocketCleanup
branch
from
October 22, 2026 22:46
33b079e to
cf8728a
Compare
This branch has not been deployed
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.
Description
prvTCPSocketCopy() stores a pointer to a new child socket in the listening socket's u.xTCP.pxPeerSocket field, but when prvTCPCreateWindow() fails the IPv4 and IPv6 listen paths free that child through a direct vSocketClose() call that bypasses the vTCPRemoveTCPChild() cleanup. With this change, the reference is cleared before the socket is closed.
We thank Ghaith Abdulreda for this hardening suggestion.
Test Steps
Unit tested
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.