mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 17:05:42 +01:00
Merge of fix for IOTSSL-481 - Double free
Potential double free in mbedtls_ssl_conf_psk()
This commit is contained in:
commit
fec73a8eec
@ -25,6 +25,9 @@ Security
|
|||||||
* Fix possible heap buffer overflow in base64_encoded() when the input
|
* Fix possible heap buffer overflow in base64_encoded() when the input
|
||||||
buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken,
|
buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken,
|
||||||
Intelworks. Not trigerrable remotely in TLS.
|
Intelworks. Not trigerrable remotely in TLS.
|
||||||
|
* Fix potential double-free if mbedtls_conf_psk() is called repeatedly on
|
||||||
|
the same mbedtls_ssl_config object and memory allocation fails. Found by
|
||||||
|
Guido Vranken, Intelworks. Cannot be forced remotely.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure
|
* Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure
|
||||||
|
@ -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 New Issue
Block a user