mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-11 06:28:17 +02:00
Fix potential double-free in ssl_set_psk()
This commit is contained in:
@@ -15,6 +15,9 @@ Security
|
||||
on crafted PEM input data. Found an fix provided by Guid Vranken.
|
||||
Not triggerable remotely in TLS. Triggerable remotely if you accept PEM
|
||||
data from an untrusted source.
|
||||
* Fix potential double-free if ssl_set_psk() is called repeatedly on
|
||||
the same ssl_context object and some memory allocations fail.
|
||||
Found by Guido Vranken. Can not be forced remotely.
|
||||
|
||||
= mbed TLS 1.3.13 reladsed 2015-09-17
|
||||
|
||||
|
||||
@@ -4064,7 +4064,9 @@ int ssl_set_psk( ssl_context *ssl, const unsigned char *psk, size_t psk_len,
|
||||
( ssl->psk_identity = polarssl_malloc( psk_identity_len ) ) == NULL )
|
||||
{
|
||||
polarssl_free( ssl->psk );
|
||||
polarssl_free( ssl->psk_identity );
|
||||
ssl->psk = NULL;
|
||||
ssl->psk_identity = NULL;
|
||||
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user