From: Marc-André Lureau <marcandre.lureau@redhat.com>
Commit 4cc2b63bd829426b05bad0d8952f1855a10d6ed7 fixed an out of bounds
ZeroMem() call. However, as Laszlo Ersek pointed out, the intent was
to clear all but the Identifier (to revert the effect of
RegisterHashInterfaceLib()). For that, it should clear the
SupportedHashMask too.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
.../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
index 361a4f6508a0..bf6e1336ee76 100644
--- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
+++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
@@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor (
//
ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface));
HashInterfaceHob->HashInterfaceCount = 0;
+ HashInterfaceHob->SupportedHashMask = 0;
}
//
--
2.16.2.346.g9779355e34
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Chao Zhang<chao.b.zhang@intel.com> -----Original Message----- From: marcandre.lureau@redhat.com [mailto:marcandre.lureau@redhat.com] Sent: Wednesday, March 7, 2018 11:58 PM To: edk2-devel@lists.01.org Cc: pjones@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; stefanb@linux.vnet.ibm.com; lersek@redhat.com; qemu-devel@nongnu.org; javierm@redhat.com; Marc-André Lureau <marcandre.lureau@redhat.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com> Subject: [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask From: Marc-André Lureau <marcandre.lureau@redhat.com> Commit 4cc2b63bd829426b05bad0d8952f1855a10d6ed7 fixed an out of bounds ZeroMem() call. However, as Laszlo Ersek pointed out, the intent was to clear all but the Identifier (to revert the effect of RegisterHashInterfaceLib()). For that, it should clear the SupportedHashMask too. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 + 1 file changed, 1 insertion(+) diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c index 361a4f6508a0..bf6e1336ee76 100644 --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRoute +++ rPei.c @@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor ( // ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface)); HashInterfaceHob->HashInterfaceCount = 0; + HashInterfaceHob->SupportedHashMask = 0; } // -- 2.16.2.346.g9779355e34 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Star Zeng <star.zeng@intel.com> Thanks, Star -----Original Message----- From: Zhang, Chao B Sent: Thursday, March 8, 2018 8:35 AM To: marcandre.lureau@redhat.com; edk2-devel@lists.01.org Cc: pjones@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; stefanb@linux.vnet.ibm.com; lersek@redhat.com; qemu-devel@nongnu.org; javierm@redhat.com; Zeng, Star <star.zeng@intel.com> Subject: RE: [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask Reviewed-by: Chao Zhang<chao.b.zhang@intel.com> -----Original Message----- From: marcandre.lureau@redhat.com [mailto:marcandre.lureau@redhat.com] Sent: Wednesday, March 7, 2018 11:58 PM To: edk2-devel@lists.01.org Cc: pjones@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; stefanb@linux.vnet.ibm.com; lersek@redhat.com; qemu-devel@nongnu.org; javierm@redhat.com; Marc-André Lureau <marcandre.lureau@redhat.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Zeng, Star <star.zeng@intel.com> Subject: [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask From: Marc-André Lureau <marcandre.lureau@redhat.com> Commit 4cc2b63bd829426b05bad0d8952f1855a10d6ed7 fixed an out of bounds ZeroMem() call. However, as Laszlo Ersek pointed out, the intent was to clear all but the Identifier (to revert the effect of RegisterHashInterfaceLib()). For that, it should clear the SupportedHashMask too. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 + 1 file changed, 1 insertion(+) diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c index 361a4f6508a0..bf6e1336ee76 100644 --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRoute +++ rPei.c @@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor ( // ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface)); HashInterfaceHob->HashInterfaceCount = 0; + HashInterfaceHob->SupportedHashMask = 0; } // -- 2.16.2.346.g9779355e34 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 03/07/18 16:57, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > Commit 4cc2b63bd829426b05bad0d8952f1855a10d6ed7 fixed an out of bounds > ZeroMem() call. However, as Laszlo Ersek pointed out, the intent was > to clear all but the Identifier (to revert the effect of > RegisterHashInterfaceLib()). For that, it should clear the > SupportedHashMask too. > > Cc: Jiewen Yao <jiewen.yao@intel.com> > Cc: Chao Zhang <chao.b.zhang@intel.com> > Cc: Star Zeng <star.zeng@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > index 361a4f6508a0..bf6e1336ee76 100644 > --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > @@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor ( > // > ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface)); > HashInterfaceHob->HashInterfaceCount = 0; > + HashInterfaceHob->SupportedHashMask = 0; > } > > // > Reviewed-by: Laszlo Ersek <lersek@redhat.com> Thanks, Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2025 Red Hat, Inc.