diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-10-15 01:53:55 +0100 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2014-10-15 08:54:26 -0400 |
commit | c2b90b398dc2dc792360c36dd232024e736fcda6 (patch) | |
tree | cc575d18424b49f2b7cc8f6fa83ba2f2c3a0708f /ssl/t1_lib.c | |
parent | c2a2ff3f0acf1b11f2602bc0bd70b84d1c6a5602 (diff) | |
download | openssl-new-c2b90b398dc2dc792360c36dd232024e736fcda6.tar.gz |
Fix for session tickets memory leak.
CVE-2014-3567
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 5dc6070a03779cd524f0e67f76c945cb0ac38320)
Diffstat (limited to 'ssl/t1_lib.c')
-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 c747b3092f..2986432697 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3344,7 +3344,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); return 2; + } /* 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); |