mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-08 06:42:24 +03:00
The race was due to mpi_exp_mod storing a Montgomery coefficient in the context (RM, RP, RQ). The fix was verified with -fsanitize-thread using ssl_pthread_server and two concurrent clients. A more fine-grained fix should be possible, locking just enough time to check if those values are OK and set them if not, rather than locking for the whole mpi_exp_mod() operation, but it will be for later.
45 KiB
45 KiB