Memory leak in state machine in error path
When EC is disabled, and an error occurs in ssl_generate_master_secret() or RAND_bytes(), the error path does not free rsa_decrypt. RT#4197 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
87a595e554
commit
c849c6d9d3
@ -2620,8 +2620,8 @@ MSG_PROCESS_RETURN tls_process_client_key_exchange(SSL *s, PACKET *pkt)
|
|||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_EC
|
#ifndef OPENSSL_NO_EC
|
||||||
EVP_PKEY_free(ckey);
|
EVP_PKEY_free(ckey);
|
||||||
OPENSSL_free(rsa_decrypt);
|
|
||||||
#endif
|
#endif
|
||||||
|
OPENSSL_free(rsa_decrypt);
|
||||||
#ifndef OPENSSL_NO_PSK
|
#ifndef OPENSSL_NO_PSK
|
||||||
OPENSSL_clear_free(s->s3->tmp.psk, s->s3->tmp.psklen);
|
OPENSSL_clear_free(s->s3->tmp.psk, s->s3->tmp.psklen);
|
||||||
s->s3->tmp.psk = NULL;
|
s->s3->tmp.psk = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user