summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtNorFlashDxe
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2024-01-09 12:29:01 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-01-09 16:31:57 +0000
commitae22b2f136bcbd27135a5f4dd76d3a68a172d00e (patch)
treebde8e3f3f091539ceed2b58e173fb06b3b20a793 /OvmfPkg/VirtNorFlashDxe
parent3b1ddbddeee64cee5aba4f0170fbf5e4781d4879 (diff)
downloadedk2-ae22b2f136bcbd27135a5f4dd76d3a68a172d00e.tar.gz
edk2-ae22b2f136bcbd27135a5f4dd76d3a68a172d00e.tar.bz2
edk2-ae22b2f136bcbd27135a5f4dd76d3a68a172d00e.zip
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>
Diffstat (limited to 'OvmfPkg/VirtNorFlashDxe')
-rw-r--r--OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c4
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",