Skip to content

Commit

Permalink
Cleanse the SSLv3 MAC secret when we clean up the read record layer
Browse files Browse the repository at this point in the history
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #18132)
  • Loading branch information
mattcaswell committed Aug 18, 2022
1 parent cffafb5 commit c77d455
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ssl/record/methods/tls_common.c
Expand Up @@ -1198,7 +1198,6 @@ tls_new_record_layer(OSSL_LIB_CTX *libctx, const char *propq, int vers,

static void tls_int_free(OSSL_RECORD_LAYER *rl)
{
/* TODO(RECLAYER): Cleanse sensitive fields */
BIO_free(rl->prev);
BIO_free(rl->bio);
BIO_free(rl->next);
Expand All @@ -1210,6 +1209,9 @@ static void tls_int_free(OSSL_RECORD_LAYER *rl)
COMP_CTX_free(rl->expand);
#endif

if (rl->version == SSL3_VERSION)
OPENSSL_cleanse(rl->mac_secret, sizeof(rl->mac_secret));

OPENSSL_free(rl);
}

Expand Down

0 comments on commit c77d455

Please sign in to comment.