Merged https://github.com/tianocore/edk2/pull/3694

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao,
> Jiewen
> Sent: Thursday, December 1, 2022 2:27 PM
> To: Xu, Min M <min.m...@intel.com>; devel@edk2.groups.io
> Cc: Aktas, Erdem <erdemak...@google.com>; James Bottomley
> <j...@linux.ibm.com>; Gerd Hoffmann <kra...@redhat.com>; Tom
> Lendacky <thomas.lenda...@amd.com>
> Subject: Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformInitLib: Add
> check to NvVarStoreFV HeaderLength
> 
> Reviewed-by: Jiewen Yao <jiewen....@intel.com>
> 
> > -----Original Message-----
> > From: Xu, Min M <min.m...@intel.com>
> > Sent: Sunday, November 27, 2022 3:00 PM
> > To: devel@edk2.groups.io
> > Cc: Xu, Min M <min.m...@intel.com>; Aktas, Erdem
> > <erdemak...@google.com>; James Bottomley <j...@linux.ibm.com>;
> Yao,
> > Jiewen <jiewen....@intel.com>; Gerd Hoffmann <kra...@redhat.com>;
> > Tom Lendacky <thomas.lenda...@amd.com>
> > Subject: [PATCH V1 1/1] OvmfPkg/PlatformInitLib: Add check to
> > NvVarStoreFV HeaderLength
> >
> > From: Min M Xu <min.m...@intel.com>
> >
> > There should be a check that the FV HeaderLength cannot be an odd
> > number. Otherwise in the following CalculateSum16 there would be an
> > ASSERT.
> >
> > In
> ValidateFvHeader@QemuFlashFvbServicesRuntimeDxe/FwBlockServices.c
> > there a is similar check to the FwVolHeader->HeaderLength.
> >
> > Cc: Erdem Aktas <erdemak...@google.com>
> > Cc: James Bottomley <j...@linux.ibm.com>
> > Cc: Jiewen Yao <jiewen....@intel.com>
> > Cc: Gerd Hoffmann <kra...@redhat.com>
> > Cc: Tom Lendacky <thomas.lenda...@amd.com>
> > Signed-off-by: Min Xu <min.m...@intel.com>
> > ---
> >  OvmfPkg/Library/PlatformInitLib/Platform.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c
> > b/OvmfPkg/Library/PlatformInitLib/Platform.c
> > index 2582689ffe35..77f22de046f2 100644
> > --- a/OvmfPkg/Library/PlatformInitLib/Platform.c
> > +++ b/OvmfPkg/Library/PlatformInitLib/Platform.c
> > @@ -653,6 +653,7 @@ PlatformValidateNvVarStore (
> >        (!CompareGuid (&FvHdrGUID, &NvVarStoreFvHeader-
> >FileSystemGuid))
> > ||
> >        (NvVarStoreFvHeader->Signature != EFI_FVH_SIGNATURE) ||
> >        (NvVarStoreFvHeader->Attributes != 0x4feff) ||
> > +      ((NvVarStoreFvHeader->HeaderLength & 0x01) != 0) ||
> >        (NvVarStoreFvHeader->Revision != EFI_FVH_REVISION) ||
> >        (NvVarStoreFvHeader->FvLength != NvVarStoreSize)
> >        )
> > --
> > 2.29.2.windows.2
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96880): https://edk2.groups.io/g/devel/message/96880
Mute This Topic: https://groups.io/mt/95285469/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to