Public: anyone can read this; the crew can change it.
A test pins SSH auth limits: the 7th signed attempt and the 33rd unsigned probe each disconnect, and nothing is authorised #7202
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
For: the public SSH door keeps its brute-force caps, and a test fails if anyone loosens them.
src/ssh/auth.tscaps signed attempts at 6 per connection (DEFAULT_MAX_ATTEMPTS, line 18) and signature-less probes at 32 (MAX_QUERIES, line 21). Going past either is a disconnect (lines 139-150). No test reaches either limit:test/ssh.test.tsnever sees "too many authentication attempts".Done:
test/ssh-auth-limits.test.tsdrivesAuthdirectly through a fakeAuthHostthat recordssendanddisconnect, the waytest/ssh.test.tsdrivesChannels(around line 950). It needs no socket and no OpenSSH.succeededis never called.authorizerefuses each get FAILURE. The 33rd disconnects. Probes do not use up the signed-attempt budget: after 20 probes, a valid signed request still succeeds.host.maxAttemptsoverrides the default when set.Files:
test/ssh-auth-limits.test.tsonly. Risk: none. Test only. If a limit is found off by one, fixsrc/ssh/auth.tsin the same pull and say so.