mirror of https://github.com/acidanthera/audk.git
SecurityPkg/DxeImageVerificationLib: reject CertStack.CertNumber==0 per DBX (CVE-2019-14575)
In case the signers' certificate stack, retrieved from the PE/COFF image's Authenticode blob, has zero elements (=there are zero signer certificates), then we should consider the image forbidden by DBX, not accepted by DBX. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
fbb9607223
commit
c13742b180
|
@ -1326,7 +1326,7 @@ IsForbiddenByDbx (
|
||||||
// UINT8 Certn[];
|
// UINT8 Certn[];
|
||||||
//
|
//
|
||||||
Pkcs7GetSigners (AuthData, AuthDataSize, &CertBuffer, &BufferLength, &TrustedCert, &TrustedCertLength);
|
Pkcs7GetSigners (AuthData, AuthDataSize, &CertBuffer, &BufferLength, &TrustedCert, &TrustedCertLength);
|
||||||
if ((BufferLength == 0) || (CertBuffer == NULL)) {
|
if ((BufferLength == 0) || (CertBuffer == NULL) || (*CertBuffer) == 0) {
|
||||||
IsForbidden = TRUE;
|
IsForbidden = TRUE;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue