Skip to content

ssl_tls13_server does not respect config's min_tls_version value #8593

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

Closed
alluettiv opened this issue Dec 3, 2023 · 1 comment · Fixed by #8595
Closed

ssl_tls13_server does not respect config's min_tls_version value #8593

alluettiv opened this issue Dec 3, 2023 · 1 comment · Fixed by #8595
Assignees
Labels
bug component-tls13 priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)

Comments

@alluettiv
Copy link

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

@yanrayw
Copy link

yanrayw commented Dec 4, 2023

Thanks for reporting this issue, we'll look into it soon.

@yanrayw yanrayw added bug component-tls13 priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most) size-s Estimated task size: small (~2d) and removed size-xs Estimated task size: extra small (a few hours at most) labels Dec 4, 2023
@yanrayw yanrayw self-assigned this Dec 4, 2023
@github-project-automation github-project-automation bot moved this to [3.6] TLS 1.3 misc for LTS in Backlog for Mbed TLS Aug 30, 2024
@gilles-peskine-arm gilles-peskine-arm marked this as a duplicate of #10142 Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-tls13 priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Projects
Status: [3.6] TLS 1.3 misc for LTS
Development

Successfully merging a pull request may close this issue.

2 participants