All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Pitt <martin@amutable.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH for-11.2] hw/uefi: accept a PK enrolled in setup mode
Date: Fri, 27 Nov 2026 06:24:45 +0100	[thread overview]
Message-ID: <awkUHTIhRM_DHrTR@piware.de> (raw)

From: Martin Pitt <martin@amutable.com>

uefi_vars_check_auth_2_sb() returns an efi_status. Commit cc3cf42e618a
changed it to return "true" for the "no self-signed PK is required" code
path. That value 1 is interpreted as EFI_WARN_UNKNOWN_GLYPH, so
uefi_vars_mm_set_variable() rejects the write, and the guest can never
enroll its own PK. Return the correct code to fix this.

Since commit a1b96fcde870 ("hw/uefi: improve default config security")
a self-signed PK is not required by default. This bug can be worked
around by forcing the still working old code path:

  -global uefi-vars-sysbus.require-self-signed-pk=on

Fixes: cc3cf42e618a ("hw/uefi: add require-self-signed-pk config option")
Signed-off-by: Martin Pitt <martin@amutable.com>
---
 hw/uefi/var-service-auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/uefi/var-service-auth.c b/hw/uefi/var-service-auth.c
index 21fc50f904..744c2cc193 100644
--- a/hw/uefi/var-service-auth.c
+++ b/hw/uefi/var-service-auth.c
@@ -214,7 +214,7 @@ static efi_status uefi_vars_check_auth_2_sb(uefi_vars_state *uv,
             };
             return uefi_vars_check_pkcs7_2(&tmp, NULL, NULL, va, data);
         } else {
-            return true;
+            return EFI_SUCCESS;
         }
     }
 
-- 
2.56.0



             reply	other threads:[~2026-11-27  5:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  5:24 Martin Pitt [this message]
2026-11-27 12:17 ` [PATCH for-11.2] hw/uefi: accept a PK enrolled in setup mode Philippe Mathieu-Daudé

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-all 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=awkUHTIhRM_DHrTR@piware.de \
    --to=martin@amutable.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.