From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: Jordan Justen <jordan.l.justen@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Oliver Steffen <osteffen@redhat.com>,
Pawel Polawski <ppolawsk@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: [PATCH 1/1] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: add security warning
Date: Fri, 16 Dec 2022 11:11:34 +0100 [thread overview]
Message-ID: <20221216101134.2201546-1-kraxel@redhat.com> (raw)
OVMF builds in stateless secure boot configuration
(SECURE_BOOT_ENABLE=TRUE + SMM_REQUIRE=FALSE) are expected to use the
emulated variable store (EmuVariableFvbRuntimeDxe) with the store being
re-initialized on each reset (see PlatformInitEmuVariableNvStore())
Using these builds with writable flash is not secure. Log a warning
message saying so in case we find such a configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
index 61e1f2e196e5..ab7154685424 100644
--- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
+++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
@@ -57,6 +57,11 @@ InstallProtocolInterfaces (
NULL
);
ASSERT_EFI_ERROR (Status);
+ #ifdef SECURE_BOOT_FEATURE_ENABLED
+ DEBUG ((DEBUG_WARN, "This build is configured for stateless secure boot.\n"));
+ DEBUG ((DEBUG_WARN, "Using this build with writable flash is NOT secure.\n"));
+ // should we ASSERT(0) here?
+ #endif
} else if (IsDevicePathEnd (FvbDevice->DevicePath)) {
//
// Device already exists, so reinstall the FVB protocol
--
2.38.1
next reply other threads:[~2022-12-16 10:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 10:11 Gerd Hoffmann [this message]
2022-12-17 3:10 ` [PATCH 1/1] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: add security warning Yao, Jiewen
2022-12-19 8:53 ` Gerd Hoffmann
2022-12-19 14:47 ` [edk2-devel] " Yao, Jiewen
2022-12-20 7:18 ` Gerd Hoffmann
2022-12-21 6:25 ` Yao, Jiewen
[not found] ` <173175F495CB0C1B.6312@groups.io>
2022-12-17 3:14 ` Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221216101134.2201546-1-kraxel@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox