-
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
hmac_drbg_free() called too often and too early inside benchmark.c #1095
Comments
Hi @TrinityTonic Thank you for reporting this |
@RonEld Yea, I was noticing the problem with MBEDTLS_THREADING_C as my (alternative) Mutex is freed when hmac_drbg_free() is called and later on the the code tried to lock the mutex it had freed before. |
ARM Internal Ref: IOTSSL-1761 |
Remove redunadnat calls to `hmac_drbg_free()` between seeding operations, which make the mutex invalid. Fixes Mbed-TLS#1095
Remove redunadnat calls to `hmac_drbg_free()` between seeding operations, which make the mutex invalid. Fixes Mbed-TLS#1095
Remove redunadnat calls to `hmac_drbg_free()` between seeding operations, which make the mutex invalid. Fixes Mbed-TLS#1095
Remove redunadnat calls to `hmac_drbg_free()` between seeding operations, which make the mutex invalid. Fixes Mbed-TLS#1095
Description
There's a bug in the mbedTLS benchmark program. When HMAC_DRBG_C is tested, two configurations, namely with SHA1 and with SHA256 are tested. However for both configurations mbedtls_hmac_drbg_free() is called, which means that the context is freed too early although it is being used later. mbedtls_hmac_drbg_free() should only be called at the end of the
#if defined(MBEDTLS_HMAC_DRBG_C)
- code.Bug
mbed TLS build:
Version: 2.6.0
The text was updated successfully, but these errors were encountered: