]> git.ipfire.org Git - thirdparty/openssl.git/commit - include/crypto/evp.h
Fix an EVP_MD_CTX leak
authorMatt Caswell <matt@openssl.org>
Thu, 3 Sep 2020 10:50:30 +0000 (11:50 +0100)
committerTomas Mraz <tmraz@fedoraproject.org>
Thu, 10 Sep 2020 09:35:42 +0000 (11:35 +0200)
commit3101ab603cd82cdbc81de0902b2b4718e8f1279b
tree02647b1a149bc52bd9973534eac593dc0744fe74
parentb830e0042972a237c6677c071f1fcde5c1afbea7
Fix an EVP_MD_CTX leak

If we initialise an EVP_MD_CTX with a legacy MD, and then reuse the same
EVP_MD_CTX with a provided MD then we end up leaking the md_data.

We need to ensure we free the md_data if we change to a provided MD.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12779)
crypto/evp/digest.c
crypto/evp/m_sigver.c
include/crypto/evp.h