-
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
Breakage due to enabling TLS 1.3 by default in 3.6.0 #9223
Labels
Comments
Proposal for 3.6.1: Make it all work
|
rcelyte
added a commit
to rcelyte/BeatUpRcelyte
that referenced
this issue
Jun 9, 2024
See Mbed-TLS/mbedtls#9223 for more details
5 tasks
yuxiaomao
added a commit
to yuxiaomao/hashlink
that referenced
this issue
Aug 1, 2024
4 tasks
All the issues causing the failures mentioned here are addressed in Mbed TLS 3.6.1 which as now been release. When further work remains, it is tracked in separate issues. So, I'm closing this one. |
mpg
added a commit
to mpg/mbedtls
that referenced
this issue
Sep 2, 2024
This is for compatibility, for people transitioning from 1.2 to 1.3. See Mbed-TLS#9223 "Mandatory server authentication" and reports linked from there. In the future we're likely to make server authentication mandatory in both 1.2 and 1.3. See Mbed-TLS#7080 Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Dec 2, 2024
<Mbed-TLS/mbedtls#9223> Since there is no configuration option for limiting the TLS version, disable 1.3 until upstream updates the enclosed mbedtls.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Mbed TLS 3.6.0, we enabled TLS 1.3 support in by default. Unfortunately, this broke many applications that were working fine with Mbed TLS ≤3.5.x in the default configuration. The goal of this issue is to discuss how we'll resolve this in Mbed TLS 3.6.1. Continue reading for a list of known problems and workarounds for users of Mbed TLS 3.6.0.
Known problems
General workaround: you can disable TLS 1.3 support at compile time by commenting out or removing
#define MBEDTLS_SSL_PROTO_TLS1_3
frominclude/mbedtls/mbedtls_config.h
.General workaround: you can disable TLS 1.3 support at runtime by calling
mbedtls_ssl_conf_max_tls_version(ssl_config, MBEDTLS_SSL_VERSION_TLS1_2)
beforembedtls_ssl_setup
.PSA initialization
Symptom:
mbedtls_ssl_handshake
fails with an internal error.Cause: the TLS 1.3 code uses the PSA crypto subsystem, which needs to be initialized with
psa_crypto_init
.Workaround: call
psa_crypto_init
before starting a TLS handshake.You only need to call
psa_crypto_init()
once for the whole application; calling it a second time has no effect. If you are using a memory leak detector, callmbedtls_psa_crypto_free()
in your cleanup code to clear the resources allocated bypsa_crypto_init()
.Further discussion: #9072, #9210
Mandatory server authentication
Symptom: In a TLS client,
mbedtls_ssl_conf_authmode(ssl_config, MBEDTLS_SSL_VERIFY_NONE)
ormbedtls_ssl_conf_authmode(ssl_config, MBEDTLS_SSL_VERIFY_OPTIONAL)
works only for TLS 1.2 connections, not for TLS 1.3 connections.Cause: server authentication is mandatory in TLS 1.3 clients.
Workaround: none
See also: #9072, #9079, #7075, #9210
No CA callback support
Symptom:
mbedtls_ssl_conf_ca_cb
has no effect with TLS 1.3 connections.Cause: missing feature.
Workaround: none
Further discussion: #7079
Key store size
Symptom: Opening many TLS connections fails with an out-of-memory error, despite having not running out of RAM.
Cause: TLS 1.3 uses the PSA crypto subsystem, which places keys in a fixed-size array.
Workaround: set the compile-time option
MBEDTLS_PSA_KEY_SLOT_COUNT
to at least the number of simultaneous handshakes (in the default configuration — activatingMBEDTLS_USE_PSA_CRYPTO
consumes more keys, even after the handshake).Further discussion: #9216
MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET error code
Symptom: When a client established a TLS 1.3 session, post-handshake, the server may send NewSessionTicket messages. The reception of such message is notified to the client application by TLS APIs (mostly mbedtls_ssl_read/write()) returning the MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET error code. This error code is a "non-fatal" error code but a <=3.5 working application client is likely to handle it as a fatal error and discard the connection.
Cause: Establishment of a TLS 1.3 session instead of a TLS 1.2 session due to TLS 1.3 being enabled is the default configuration.
Workaround: Handle MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET as a non-fatal error code like MBEDTLS_ERR_SSL_WANT_READ or MBEDLTS_ERR_SSL_WANT_WRITE.
Further discussion: #8749
Some TLS 1.2 clients cannot conect to an Mbed TLS 3.6.0 server
Symptom: TLS 1.2-only clients that send a ClientHello message with
legacy_compression_methods
work with Mbed TLS 3.5, which rejects compression, but understands the offer). With Mbed TLS 3.6.0 in the default configuration, the connection fails because the server rejects the ClientHello packet as malformed for TLS 1.3 in a way that bypasses the fallback to TLS 1.2.Workaround: configure clients not to offer compression methods.
Further discussion: #9243
The text was updated successfully, but these errors were encountered: