Skip to content

Commit

Permalink
Fix for session tickets memory leak.
Browse files Browse the repository at this point in the history
CVE-2014-3567

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 5dc6070a03779cd524f0e67f76c945cb0ac38320)
  • Loading branch information
snhenson authored and Geoff Thorpe committed Oct 15, 2014
1 parent d9d09a8 commit 7fd4ce6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ssl/t1_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,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);
Expand Down

0 comments on commit 7fd4ce6

Please sign in to comment.