AuthenticodeVerify() calls OpenSSLs d2i_PKCS7() API to parse asn encoded signed authenticode pkcs#7 data. when this successfully returns, a type check is done by calling PKCS7_type_is_signed() and then Pkcs7->d.sign->contents->type is used. It is possible to construct an asn1 blob that successfully decodes and have d2i_PKCS7() return a valid pointer and have PKCS7_type_is_signed() also return success but have Pkcs7->d.sign be a NULL pointer. Reference: https://bugzilla.tianocore.org/show_bug.cgi?id=1914
Created edk2 tracking bugs for this issue: Affects: epel-all [bug 1889878] Affects: fedora-all [bug 1889877]
Upstream commit 26442d11e620 ("CryptoPkg/BaseCryptLib: fix NULL dereference (CVE-2019-14584)", 2020-10-21).
Upstream patch: https://github.com/tianocore/edk2/commit/26442d11e620a9e81c019a24a4ff38441c64ba10