-
Notifications
You must be signed in to change notification settings - Fork 349
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
Lack of timeout for SSL handshake leads to connection leak #392
Comments
A temporary fix for this.(Only for rustls module) |
This is a potential security issue for user expose tls directly with actix-net based app. Idealy there should be a timeout for tls accept(server side handshake) and h2/h3 handshake. My suggestion on the long term is that |
Can confirm that this solves the problem shown by my example 🎉 |
#393 was merged (yay!), so this issue can be closed AFAIK. I'll keep it open in case it is being used as a reminder to update a changelog. |
created easier to track issue in -web |
The following procedure, for which I have made a reproducible example, will cause
actix-web
to leak a TCP connection in theESTABLISHED
state:HttpServer
and callbind_rustls
TcpStream
to the address of the bindingmem::forget
the stream to avoid closing it normallyTo avoid this leak, I suggest you add a configurable SSL handshake timeout.
Note: My example was originally intended to reproduce #351, but I was unable to do so with synthetic load (I didn't attempt a connection flood).
The text was updated successfully, but these errors were encountered: