Skip to content

execute handleConn in goroutine to make it non-blocking #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2023
Merged

execute handleConn in goroutine to make it non-blocking #7

merged 1 commit into from
Mar 20, 2023

Conversation

abbbi
Copy link
Contributor

@abbbi abbbi commented Mar 1, 2023

hi,

handleConn is not executed as go routine, potentially blocking any other connection if an handshake does not finish.
So any sshd instance is easily DoS'able :-)
How to reproduce?

Use netcat to connect:


  nc localhost 2222
SSH-2.0-Go

while this connection is open, it blocks all other connections to the sshd. Calling handleConn as go routine fixes this.
See also: golang/go#43521

@abbbi
Copy link
Contributor Author

abbbi commented Mar 16, 2023

@Matir

@Matir
Copy link
Owner

Matir commented Mar 20, 2023

Thanks for the contribution, sorry I missed the initial PR!

@Matir Matir merged commit e8fd6eb into Matir:master Mar 20, 2023
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.

2 participants