-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ssl_ticket_update_keys removes keys newer than 1 second #1968
Labels
Comments
hanno-becker
changed the title
ssl_ticket_update_keys removes tickets newer than 1 second
ssl_ticket_update_keys removes keys newer than 1 second
Aug 20, 2018
ARM Internal Ref: IOTSSL-2482 |
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 21, 2018
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 22, 2018
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 22, 2018
hanno-becker
pushed a commit
to hanno-becker/mbedtls
that referenced
this issue
Aug 22, 2018
This was referenced Aug 22, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context:
ssl_ticket_update_keys()
checks the lifetime of keys and generates fresh ones on expiration:Issue: In the check
a key is considered expired if
ssl_ticket_update_keys()
is called within a second after key generation. Instead, the check should read as follows:Impact: Ticket keys might be invalidated too early, leading to rejection of all attempts to resume sessions through tickets that were protected through them.
This does currently not affect the relevant tests in
ssl-opt.sh
because when the server parses the secondClientHello
and callsssl_ticket_update_keys()
, it only invalidates one of the two keys stored internally, keeping the one that was used to encrypt the session ticket.However, if session resumption was multiple times through the same ticket within less than a second, the key would be invalidated, and session resumption would fail. This can be witnessed by using
reconnect=2
inssl_client2
, and making sure thatmbedtls_ssl_get_session()
(saving the session to resume subsequently) is only called after the first handshake. Alternatively, when testing ticket-based session resumption in DTLS -- where theClientHello
sent for session resumption doesn't contain a valid ticket -- the failure can be witnessed, because the client sends twoClientHello
s on session resumption, one without and one with a cookie.The text was updated successfully, but these errors were encountered: