jpillora / sshd-lite

A feature-light sshd(8) for Windows, Mac, and Linux written in Go
MIT License
82 stars 24 forks source link

DoS: Connecting with netcat will block all further connections #6

Closed abbbi closed 1 year ago

abbbi commented 1 year ago

Opening an connection via netcat will output the ssh banner:

  ~ $ echo foo | nc localhost 20000
 SSH-2.0-Go

until this connection times out, no other ssh connection can be established, basically blocking the complete server. It appears you need to wrap ssh.NewServerConn or alike into a goroutine.

jpillora commented 1 year ago

Thank you, good catch

On Wed, 1 Mar 2023 at 2:35 am Michael Ablassmeier @.***> wrote:

Opening an connection via netcat will output the ssh banner:

~ $ echo foo | nc localhost 20000 SSH-2.0-Go

until this connection times out, no other ssh connection can be established, basically blocking the complete server.

— Reply to this email directly, view it on GitHub https://github.com/jpillora/sshd-lite/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X45KKYIC6SV3QFYWO23WZYLKXANCNFSM6AAAAAAVK4GEKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>