Skip to content

fix(net): reject oversized descriptors before timed TCP I/O - #1073

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
hiyouwhatsapp:fix/tcp-timeout-fd-bounds-1069
Nov 2, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
hiyouwhatsapp:fix/tcp-timeout-fd-bounds-1069

Conversation

@hiyouwhatsapp

Copy link
Copy Markdown
Contributor

Fixes #1069

The timed TCP paths could narrow an oversized POSIX fd and end up reading from or writing to another live socket

I added the existing descriptor check before nonempty operations in both the TCP helpers and the direct POSIX timeout path

Added a native regression using a real loopback connection that covers positive and negative truncation, untouched buffers and sockets, valid I/O and zero-length calls at O0 and O2

Windows still accepts its full-width socket handles

Haven't run the native suite locally, CI still needs to check it

Guard the public timeout APIs and direct POSIX helper before native descriptor narrowing

Cover positive and negative truncation, untouched live sockets, valid I/O and empty calls at O0 and O2

Signed-off-by: hiyouwhatsapp <[email protected]>
@LunaStev
LunaStev merged commit e1f8eff into wavefnd:master Nov 2, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject unrepresentable POSIX descriptors before timed TCP reads and writes

2 participants