mirror of https://github.com/acidanthera/audk.git
SecurityPkg/DxeImageVerificationLib: Fix memory leaks (CVE-2019-14575)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1608 Pointer HashCtx used in IsCertHashFoundInDatabase() is not freed inside the while-loop, if it will run more than once. 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: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
578bcdc260
commit
fbb9607223
|
@ -908,6 +908,9 @@ IsCertHashFoundInDatabase (
|
|||
goto Done;
|
||||
}
|
||||
|
||||
FreePool (HashCtx);
|
||||
HashCtx = NULL;
|
||||
|
||||
SiglistHeaderSize = sizeof (EFI_SIGNATURE_LIST) + DbxList->SignatureHeaderSize;
|
||||
CertHash = (EFI_SIGNATURE_DATA *) ((UINT8 *) DbxList + SiglistHeaderSize);
|
||||
CertHashCount = (DbxList->SignatureListSize - SiglistHeaderSize) / DbxList->SignatureSize;
|
||||
|
|
Loading…
Reference in New Issue