Liming: Please also cover TpmDxeMeasureLib.TcgMeasurePeImage(). Others are good to me.
Thanks & Best regards Chao Zhang -----Original Message----- From: Gao, Liming Sent: Tuesday, July 12, 2016 3:55 PM To: edk2-devel@lists.01.org Cc: Yao, Jiewen; Zhang, Chao B Subject: [Patch 4/4] SecurityPkg DxeImageVerificationLib: Add comments in HashPeImage() The input PeImage in HashPeImage() has been checked. Cc: Jiewen Yao <jiewen....@intel.com> Cc: Chao Zhang <chao.b.zh...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming....@intel.com> --- .../Library/DxeImageVerificationLib/DxeImageVerificationLib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c index 3aef1af..7b7e6af 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -275,11 +275,14 @@ GetImageType ( /** Calculate hash of Pe/Coff image based on the authenticode image hashing in PE/COFF Specification 8.0 Appendix A - + Caution: This function may receive untrusted input. PE/COFF image is external input, so this function will validate its data structure within this image buffer before use. + Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in + its caller function DxeImageVerificationHandler(). + @param[in] HashAlg Hash algorithm type. @retval TRUE Successfully hash image. -- 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel