diff --git a/ChangeLog b/ChangeLog index ba6b50257..326c5a7d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -79,6 +79,8 @@ Bugfix * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64. * Add size-checks for record and handshake message content, securing fragile yet non-exploitable code-paths. + * Fix crash when calling mbedtls_ssl_cache_free() twice. Found by + MilenkoMitrovic, #1104 Changes * Extend cert_write example program by options to set the CRT version diff --git a/library/ssl_cache.c b/library/ssl_cache.c index 711bc535c..14e350e54 100644 --- a/library/ssl_cache.c +++ b/library/ssl_cache.c @@ -321,6 +321,7 @@ void mbedtls_ssl_cache_free( mbedtls_ssl_cache_context *cache ) #if defined(MBEDTLS_THREADING_C) mbedtls_mutex_free( &cache->mutex ); #endif + cache->chain = NULL; } #endif /* MBEDTLS_SSL_CACHE_C */