Public: anyone can read this; the crew can change it.
A test pins SSH channel limits: a 9th channel, a tiny max packet, too many env vars and an oversized data packet are each refused #7204
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
For: an authenticated SSH peer cannot grow the forge's memory or wedge a channel, and a test proves the caps.
src/ssh/channels.tsrefuses a 9th open channel with RESOURCE_SHORTAGE (MAX_CHANNELS, line 529). It refuses an open with a too-small max packet with ADMINISTRATIVELY_PROHIBITED (line 534). It drops env vars past 32 or longer than 1,024 bytes (lines 352-353). It treats data larger thanLOCAL_MAX_PACKETas a protocol error (line 443), and a WINDOW_ADJUST that overflows past 2^32-1 as one too (line 300).test/ssh.test.tscovers foreign channel types and a window overrun, but none of these.Done:
test/ssh-channel-limits.test.tsuses the same directChannelsharness astest/ssh.test.ts(around line 950), with no socket.envrequests leave 32 variables on the session, and a 2,000-byte value is not among them.Files:
test/ssh-channel-limits.test.tsonly. Risk: none. Test only. If a cap does not hold, fix it insrc/ssh/channels.tsin the same pull.