diff options
author | Long Qin <qin.long@intel.com> | 2017-10-12 09:12:42 +0800 |
---|---|---|
committer | Long Qin <qin.long@intel.com> | 2017-10-18 23:03:38 +0800 |
commit | 6ded19558a2b21bcce544afcfa17fb59a8b4760a (patch) | |
tree | 7c9d48dbe6a83ba1f543291f1ce638858d6e1957 /MdePkg | |
parent | 4bbf39632c840e32996e8d43137f23fb43282859 (diff) | |
download | edk2-6ded19558a2b21bcce544afcfa17fb59a8b4760a.zip edk2-6ded19558a2b21bcce544afcfa17fb59a8b4760a.tar.gz edk2-6ded19558a2b21bcce544afcfa17fb59a8b4760a.tar.bz2 |
SecurityPkg/Pkcs7Verify: Add the comments to address security problem
Add the comments to address security problems in the Pkcs7Verify Protocol
per UEFI 2.7 updates.
The Pkcs7Verifier function VerifySignature() has problematic use cases
where it might be used to unwittingly bypass security checks. The specific
problem is that if the supplied hash is a different algorithm from the
blacklist hash, the hash will be approved even if it should have been
denied. The added comments place a strong warning about the problem.
It is possible to use the protocol reliably, either by agreeing a hash to
use for all time (like sha256) or by looping over all supported hashes when
using the protocol.
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Include/Protocol/Pkcs7Verify.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MdePkg/Include/Protocol/Pkcs7Verify.h b/MdePkg/Include/Protocol/Pkcs7Verify.h index ca5ec75..eaeda48 100644 --- a/MdePkg/Include/Protocol/Pkcs7Verify.h +++ b/MdePkg/Include/Protocol/Pkcs7Verify.h @@ -6,7 +6,7 @@ PKCS#7 is a general-purpose cryptographic standard (defined by RFC2315,
available at http://tools.ietf.org/html/rfc2315).
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -140,6 +140,14 @@ EFI_STATUS verifies the signature of the content is valid and signing certificate was not revoked
and is contained within a list of trusted signers.
+ Note: because this function uses hashes and the specification contains a variety of
+ hash choices, you should be aware that the check against the RevokedDb list
+ will improperly succeed if the signature is revoked using a different hash
+ algorithm. For this reason, you should either cycle through all UEFI supported
+ hashes to see if one is forbidden, or rely on a single hash choice only if the
+ UEFI signature authority only signs and revokes with a single hash (at time
+ of writing, this hash choice is SHA256).
+
@param[in] This Pointer to EFI_PKCS7_VERIFY_PROTOCOL instance.
@param[in] Signature Points to buffer containing ASN.1 DER-encoded PKCS
detached signature.
|