diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2024-01-09 12:29:01 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-09 16:31:57 +0000 |
commit | ae22b2f136bcbd27135a5f4dd76d3a68a172d00e (patch) | |
tree | bde8e3f3f091539ceed2b58e173fb06b3b20a793 | |
parent | 3b1ddbddeee64cee5aba4f0170fbf5e4781d4879 (diff) | |
download | edk2-ae22b2f136bcbd27135a5f4dd76d3a68a172d00e.tar.gz |
OvmfPkg/VirtNorFlashDxe: stop accepting gEfiVariableGuid
Only accept gEfiAuthenticatedVariableGuid when checking the variable
store header in ValidateFvHeader().
The edk2 code base has been switched to use the authenticated varstore
format unconditionally (even in case secure boot is not used or
supported) a few years ago.
Suggested-by: László Érsek <lersek@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20240109112902.30002-3-kraxel@redhat.com>
-rw-r--r-- | OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c index 5ee98e9b59..9a614ae4b2 100644 --- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c +++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c @@ -239,9 +239,7 @@ ValidateFvHeader ( VariableStoreHeader = (VARIABLE_STORE_HEADER *)((UINTN)FwVolHeader + FwVolHeader->HeaderLength);
// Check the Variable Store Guid
- if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
- !CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid))
- {
+ if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid)) {
DEBUG ((
DEBUG_INFO,
"%a: Variable Store Guid non-compatible\n",
|