diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-10-15 02:01:16 +0100 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2014-10-15 08:49:50 -0400 |
commit | 74f77d40a9306724eef2a89298e9caa241eac81e (patch) | |
tree | 57202a91c61a706b74a1aa2d18172650ade11825 | |
parent | 55513f3e484c206a9a4d3a51ac00fa3f7b30d17c (diff) |
Fix for session tickets memory leak.
CVE-2014-3567
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
-rw-r--r-- | ssl/t1_lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 60c7d8bca9..87181762d8 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1830,7 +1830,10 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen, HMAC_Final(&hctx, tick_hmac, NULL); HMAC_CTX_cleanup(&hctx); if (CRYPTO_memcmp(tick_hmac, etick + eticklen, mlen)) + { + EVP_CIPHER_CTX_cleanup(&ctx); goto tickerr; + } /* Attempt to decrypt session data */ /* Move p after IV to start of encrypted ticket, update length */ p = etick + 16 + EVP_CIPHER_CTX_iv_length(&ctx); |