diff options
author | Star Zeng <star.zeng@intel.com> | 2014-10-09 09:37:58 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-10-09 09:37:58 +0000 |
commit | d2a867217d63a5ef83c2877f842fd0e2c33259ba (patch) | |
tree | 5d192e0535c61893668c788e8e3ba24d1b11cdfa /MdeModulePkg | |
parent | 65ef0b0d01c5f65c2e52cf13873c6b0494347333 (diff) | |
download | edk2-platforms-d2a867217d63a5ef83c2877f842fd0e2c33259ba.tar.xz |
MdeModulePkg DxeCore: Add FVH signature check before VerifyFvHeaderChecksum in FwVol.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16200 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index 4fa177ed7c..a7b272b4d6 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c @@ -658,6 +658,14 @@ NotifyFwVolBlock ( }
ASSERT (FwVolHeader != NULL);
+ //
+ // Validate FV Header signature, if not as expected, continue.
+ //
+ if (FwVolHeader->Signature != EFI_FVH_SIGNATURE) {
+ CoreFreePool (FwVolHeader);
+ continue;
+ }
+
if (!VerifyFvHeaderChecksum (FwVolHeader)) {
CoreFreePool (FwVolHeader);
continue;
|