Skip to content

protocol: reject zero channel packet sizes - #1517

Open
sankalpsthakur wants to merge 1 commit into
mscdex:masterfrom
sankalpsthakur:fix/reject-zero-channel-packet-size
Open

protocol: reject zero channel packet sizes#1517
sankalpsthakur wants to merge 1 commit into
mscdex:masterfrom
sankalpsthakur:fix/reject-zero-channel-packet-size

Conversation

@sankalpsthakur

@sankalpsthakur sankalpsthakur commented Sep 7, 2026

Copy link
Copy Markdown

Fixes #1504. Original report by afldl.

Reject zero maximum packet sizes in CHANNEL_OPEN and CHANNEL_OPEN_CONFIRMATION before constructing a channel. A zero size cannot make progress in the channel write loops; positive sizes retain their behavior.

Regressions cover both message types at sizes 0, 1, 32768 and UINT32_MAX. They failed on untouched upstream and pass with the fix. npm run lint passes.

Full npm test is not green on macOS with Node.js 22.23.2: old-OpenSSH RSA integration exits 255, also reproduced upstream with OpenSSH 10.3. A miscellaneous localhost test timed out but passed with --dns-result-order=ipv4first. Optional native crypto is absent; unsupported arcfour is skipped.

AI tools assisted with implementation, tests and this description.

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.

max_packet_size=0 channel-send infinite loop (post-auth DoS) — RFC 4254 §5.1 cluster

1 participant