From nobody Sun Nov 29 02:11:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1795757123759662.4652746036147; Thu, 26 Nov 2026 21:25:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWoS4-0007t8-VK; Fri, 27 Nov 2026 00:24:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xWoS2-0007sd-Aq for qemu-devel@nongnu.org; Fri, 27 Nov 2026 00:24:50 -0500 Received: from www.mwellner.de ([2a03:4000:6:4019::4] helo=mail.piware.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWoS0-0005WY-Il for qemu-devel@nongnu.org; Fri, 27 Nov 2026 00:24:50 -0500 Received: from piware.de (localhost [127.0.0.1]) by mail.piware.de (Postfix) with SMTP id DEDADFFA80; Fri, 27 Nov 2026 06:24:45 +0100 (CET) Date: Fri, 27 Nov 2026 06:24:45 +0100 From: Martin Pitt To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Subject: [PATCH for-11.2] hw/uefi: accept a PK enrolled in setup mode Message-ID: MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: softfail client-ip=2a03:4000:6:4019::4; envelope-from=martin@amutable.com; helo=mail.piware.de X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.4, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.13.1.5.4/295.735.19 X-ZM-MESSAGEID: 1795757126027158500 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Martin Pitt 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=3Don Fixes: cc3cf42e618a ("hw/uefi: add require-self-signed-pk config option") Signed-off-by: Martin Pitt Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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_s= tate *uv, }; return uefi_vars_check_pkcs7_2(&tmp, NULL, NULL, va, data); } else { - return true; + return EFI_SUCCESS; } } =20 --=20 2.56.0