mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-28 18:07:34 +08:00
mbedtls_ssl_get_session() copies the whole mbedtls_ssl_session struct, including the TLS 1.3 app_secrets field. That field holds the connection's client and server application traffic secrets, the exporter master secret and the resumption master secret, so an exported session carried enough material to decrypt the connection it came from. None of these secrets is needed to resume the session: the resumption key is derived and stored separately when the NewSessionTicket is processed, session serialization does not include app_secrets, and keying-material export reads the live session. Zeroize app_secrets in the exported copy, at the export point only, so that mbedtls_ssl_session_copy() (also used by mbedtls_ssl_set_session()) is left unchanged. Fixes #10916. Signed-off-by: Joachim Bauernberger <joachim.bauernberger@protonmail.com>
7 lines
310 B
Plaintext
7 lines
310 B
Plaintext
Security
|
|
* Clear the TLS 1.3 application traffic secrets, exporter master secret and
|
|
resumption master secret from the session exported by
|
|
mbedtls_ssl_get_session(). These secrets are not needed to resume the
|
|
session and previously remained in the exported session object. Fixes
|
|
#10916.
|