-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
crypto/tls: clients don't delete tickets that fail handshakes from ClientSessionCache #24919
Comments
CC @FiloSottile |
The correct fix is to add a A hack that could work is to replace the value stored in the cache with Thoughts, @FiloSottile ? |
When a server accepts a session ticket presented by a client, but the TLS handshake fails, RFC 5077 recommends that the client delete the ticket. Because adding a full Delete method to the interface for ClientSessionCache would break existing implementations, we have the handshake implementation put a nil value instead. Fixes golang#24919
Change https://golang.org/cl/128477 mentions this issue: |
Change https://golang.org/cl/147420 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.9.2
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/2qH4SFg2Gjn
Created a TLS client and a server, and tested TLS session resumption behavior.
What did you expect to see?
If a server accepts a ticket sent by the client but the handshake fails, the client SHOULD delete the ticket from its cache, according to Section 3.2 of RFC 5077. https://tools.ietf.org/html/rfc5077. The next connection to the server should fallback to a full TLS handshake.
What did you see instead?
If a client and server attempt to resume a TLS session past the expiry of the client certificate embedded in the ticket, the client gets wedged. The server accepts the ticket, but handshake fails because of the expired certs. The ticket is not deleted from the cache however, so subsequent attempts by the client to connect to the server fail in the same way.
The text was updated successfully, but these errors were encountered: