mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 04:55:33 +00:00
Fix potential double-free in mbedtls_ssl_conf_psk()
This commit is contained in:
parent
f592e8eaf6
commit
24417f06fe
|
@ -1,5 +1,12 @@
|
||||||
mbed TLS ChangeLog (Sorted per branch, date)
|
mbed TLS ChangeLog (Sorted per branch, date)
|
||||||
|
|
||||||
|
= mbed TLS 2.1.2 released 2015-??-??
|
||||||
|
|
||||||
|
Security
|
||||||
|
* Fix potential double-free if mbedtls_conf_psk() is called repeatedly on
|
||||||
|
the same mbedtls_ssl_config object and some memory allocations fail.
|
||||||
|
Found by Guido Vranken. Can not be forced remotely.
|
||||||
|
|
||||||
= mbed TLS 2.1.1 released 2015-09-17
|
= mbed TLS 2.1.1 released 2015-09-17
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
|
|
@ -5707,7 +5707,9 @@ int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf,
|
||||||
( conf->psk_identity = mbedtls_calloc( 1, psk_identity_len ) ) == NULL )
|
( conf->psk_identity = mbedtls_calloc( 1, psk_identity_len ) ) == NULL )
|
||||||
{
|
{
|
||||||
mbedtls_free( conf->psk );
|
mbedtls_free( conf->psk );
|
||||||
|
mbedtls_free( conf->psk_identity );
|
||||||
conf->psk = NULL;
|
conf->psk = NULL;
|
||||||
|
conf->psk_identity = NULL;
|
||||||
return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
|
return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue