ssl_tls13_server does not respect config's min_tls_version value #8593
Labels
bug
component-tls13
priority-high
High priority - will be reviewed soon
size-s
Estimated task size: small (~2d)
Summary
In hybrid mode (mbedTLS compiled with TLS 1.2 and 1.3 support), ssl_tls13_server uses mbedtls_ssl_config.max_tls_version to setup initial TLS version. Then, during a handshake, if a client connects using TLS1.2, ssl_tls13_server downgrades protocol to TLS1.2 regardless of mbedtls_ssl_config.min_tls_version value.
System information
Mbed TLS version 3.5.0:
Operating system and version: Any
Configuration: mbedtls_config.h.txt
Expected behavior
ssl_tls13_server should reject TLS1.2 connections if it was configured with mbedtls_ssl_config.min_tls_version >=MBEDTLS_SSL_VERSION_TLS1_3 at runtime via mbedtls_ssl_conf_min_tls_version(&cfg, MBEDTLS_SSL_VERSION_TLS1_3);
Actual behavior
ssl_tls13_server downgrades to TLS1.2 regardless of mbedtls_ssl_config.min_tls_version value.
Steps to reproduce
Use some test tls server app, use mbedtls_ssl_conf_min_tls_version() to set minimum version to MBEDTLS_SSL_VERSION_TLS1_3 for the config, then try to connect using TLS1.2-only client.
Additional information
The text was updated successfully, but these errors were encountered: