From: Dr. Stephen Henson Date: Fri, 5 Jun 2015 11:11:25 +0000 (+0100) Subject: Fix infinite loop in CMS X-Git-Tag: OpenSSL_1_0_1n~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dd90a91d8771fd1ad5083fd46a2b3da16a587757;p=oweals%2Fopenssl.git Fix infinite loop in CMS Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting to verify and a digest is not recognised. Reported by Johannes Bauer. CVE-2015-1792 Reviewed-by: Matt Caswell --- diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 8851603f6f..8b37560821 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -131,7 +131,7 @@ static void do_free_upto(BIO *f, BIO *upto) BIO_free(f); f = tbio; } - while (f != upto); + while (f && f != upto); } else BIO_free_all(f); }