summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-10-15 01:53:55 +0100
committerGeoff Thorpe <geoff@openssl.org>2014-10-15 08:56:16 -0400
commit748270554824d2a51d1718f52a8d3ab34116bbfb (patch)
treee55c910083d77076223e3c8f435cc28592623a8a /ssl
parent3dd814ac4d0581af363068e83b5fa8d5271063d5 (diff)
Fix for session tickets memory leak.
CVE-2014-3567 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/t1_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 879467cd7c..77fe232526 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -3380,7 +3380,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);