Fix for session tickets memory leak.
CVE-2014-3567 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
55513f3e48
commit
74f77d40a9
@ -1830,7 +1830,10 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
|
|||||||
HMAC_Final(&hctx, tick_hmac, NULL);
|
HMAC_Final(&hctx, tick_hmac, NULL);
|
||||||
HMAC_CTX_cleanup(&hctx);
|
HMAC_CTX_cleanup(&hctx);
|
||||||
if (CRYPTO_memcmp(tick_hmac, etick + eticklen, mlen))
|
if (CRYPTO_memcmp(tick_hmac, etick + eticklen, mlen))
|
||||||
|
{
|
||||||
|
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||||
goto tickerr;
|
goto tickerr;
|
||||||
|
}
|
||||||
/* Attempt to decrypt session data */
|
/* Attempt to decrypt session data */
|
||||||
/* Move p after IV to start of encrypted ticket, update length */
|
/* Move p after IV to start of encrypted ticket, update length */
|
||||||
p = etick + 16 + EVP_CIPHER_CTX_iv_length(&ctx);
|
p = etick + 16 + EVP_CIPHER_CTX_iv_length(&ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user