public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] SecurityPkg: Fix potential bug in Security Boot dxe.
@ 2017-02-21  2:53 Zhang Lubo
  2017-02-22  8:31 ` Zhang, Chao B
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang Lubo @ 2017-02-21  2:53 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang, Long Qin, Yao Jiewen

since we removed the sha-1 definition in Hash table
and related macro, but the macro definition HashAlg index
may be value 4 which is exceed the range of the Hash
table array.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
---
 .../SecureBootConfigDxe/SecureBootConfigImpl.h               | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
index bea9470..58030c4 100644
--- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
+++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
@@ -89,16 +89,16 @@ extern  EFI_IFR_GUID_LABEL         *mEndLabel;
 #define WIN_CERT_UEFI_RSA2048_SIZE               256
 
 //
 // Support hash types
 //
-#define HASHALG_SHA224                         0x00000001
-#define HASHALG_SHA256                         0x00000002
-#define HASHALG_SHA384                         0x00000003
-#define HASHALG_SHA512                         0x00000004
-#define HASHALG_RAW                            0x00000005
-#define HASHALG_MAX                            0x00000005
+#define HASHALG_SHA224                         0x00000000
+#define HASHALG_SHA256                         0x00000001
+#define HASHALG_SHA384                         0x00000002
+#define HASHALG_SHA512                         0x00000003
+#define HASHALG_RAW                            0x00000004
+#define HASHALG_MAX                            0x00000004
 
 
 typedef struct {
   UINTN             Signature;
   LIST_ENTRY        Head;
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-22  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-21  2:53 [patch] SecurityPkg: Fix potential bug in Security Boot dxe Zhang Lubo
2017-02-22  8:31 ` Zhang, Chao B
2017-02-22  8:39   ` Zhang, Lubo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox