mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 12:05:36 +01:00
Fix potential double-free in ssl_conf_psk()
This commit is contained in:
parent
c8cd2c6577
commit
173c790722
@ -1,5 +1,12 @@
|
|||||||
mbed TLS ChangeLog (Sorted per branch, date)
|
mbed TLS ChangeLog (Sorted per branch, date)
|
||||||
|
|
||||||
|
= mbed TLS 2.2.0 released 2015-10-xx
|
||||||
|
|
||||||
|
Security
|
||||||
|
* Fix potential double free if mbedtls_ssl_conf_psk() is called more than
|
||||||
|
once and some allocation fails. Cannot be forced remotely. Found by Guido
|
||||||
|
Vranken, Intelworks.
|
||||||
|
|
||||||
= mbed TLS 2.1.2 released 2015-10-06
|
= mbed TLS 2.1.2 released 2015-10-06
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
@ -5701,6 +5701,8 @@ int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf,
|
|||||||
{
|
{
|
||||||
mbedtls_free( conf->psk );
|
mbedtls_free( conf->psk );
|
||||||
mbedtls_free( conf->psk_identity );
|
mbedtls_free( conf->psk_identity );
|
||||||
|
conf->psk = NULL;
|
||||||
|
conf->psk_identity = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( conf->psk = mbedtls_calloc( 1, psk_len ) ) == NULL ||
|
if( ( conf->psk = mbedtls_calloc( 1, psk_len ) ) == NULL ||
|
||||||
|
Loading…
Reference in New Issue
Block a user