You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/config.py set MBEDTLS_SSL_PROTO_TLS1_3
scripts/config.py set MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
scripts/config.py set MBEDTLS_THREADING_PTHREAD
scripts/config.py set MBEDTLS_THREADING_C
Taowyoo
changed the title
TLS 1.3 connection is unstable and sometime break in multi-thread env
[mbedtls3] TLS 1.3 connection is unstable and sometime break in multi-thread env
Oct 20, 2023
Description
TLS 1.3 connection is unstable(sometimes break) in multi-thread env:
Reproduce error
This could be reproduced on both Rust side and C side.
Rust
multithread_test_rust.sh
C
This not only could be reproduce at https://github.com/fortanix/rust-mbedtls/tree/yx/debug_tls13_multithread_bug but also on latest upstream version https://github.com/Mbed-TLS/mbedtls/tree/17526a0d168276aa3ba5833cbb1f8fcd69d688ba ( at the time of creating this issue )
Set config
Update
./mbedtls-sys/vendor/programs/ssl/ssl_pthread_server.c
with https://gist.github.com/Taowyoo/e2a90ed25bf299500074fdf03e67a050#file-ssl_pthread_server-cBuild and run example, example start a server with 5 threads and spawn 5 threads of clients to connect it.
Error
The error is random, including:
Note, the script above can run successfully with TLS 1.2 for serval time, but for TLS 1.3 the script failed in most cases.
The text was updated successfully, but these errors were encountered: