Gilles Peskine f4b3429782 Fix mutex leak in CTR_DRBG
mbedtls_ctr_drbg_free() left a mutex in the initialized state. This
caused a resource leak on platforms where mbedtls_mutex_init()
allocates resources.

To fix this, mbedtls_ctr_drbg_free() no longer reinitializes the
mutex. To preserve the property that mbedtls_ctr_drbg_free() leaves
the object in an initialized state, which is generally true throughout
the library except regarding mutex objects on some platforms, no
longer initialize the mutex in mbedtls_ctr_drbg_init(). Since the
mutex is only used after seeding, and seeding is only permitted once,
call mbedtls_mutex_init() as part of the seeding process.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-02-22 19:24:03 +01:00
..
2021-01-29 11:09:50 +01:00
2021-02-22 19:24:03 +01:00
2020-11-16 15:02:16 +01:00
2020-09-22 11:57:16 +02:00
2020-11-25 13:10:50 +01:00
2020-11-25 13:10:50 +01:00
2020-09-01 11:04:53 +02:00