Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp83069rwo; Fri, 21 Jul 2023 08:51:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlHlA4CmKAMWP/D2edOzudSLsGzcRIcWFFD6wv4GbztzSe5cwDKqZWuYiizuYFMdtC8IGFsI X-Received: by 2002:a05:6a20:54a9:b0:133:5f6a:fb6 with SMTP id i41-20020a056a2054a900b001335f6a0fb6mr3276205pzk.1.1689954683592; Fri, 21 Jul 2023 08:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689954683; cv=none; d=google.com; s=arc-20160816; b=HMoIdkKwh8tZWHJJsuni5tFyRsQt2bVxtBxqWAKWMmyxhs+j4V3bTOsAqw60EdJpux zQITvaJCP92pHbT+VWkM8YZBjzUCGZ0IHpCOA60Ognwtqj8LGprp6eyNufG+By01whWs qs0SfKsJSKLggEvfnPgdn/X7Ny4jpMnhvL4B24pTynHKqg08wg/AWekxE2TihmabJJOI QcgCPkRxPKdtnrYu7DX/NKv5F6P2r/oeUECw4PiWvlbKAtyXX0/NpmorNAuvBNs6cETP GjWGb49Md2iXA7CN4cQ85lgtwfi1hnCnhWnAYqBbGOcTXEB7mLxHUb1kMEODbGvlu6x1 JNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=bRpZOSTRgUgs93CpnfRqLnXeS2bgmI9aOiNkeLEthD0=; fh=84upHsOdXirOA/7/3g1OEwNUkYffuk3FBUbUAXg5D/o=; b=oZe/NWKGTyhvqxRGhKZ/ISZoJJbSMHNadAgTlR3+B0QgnBD9mtAGZo5hfDuFGWbkBM 7b7fmt0nvs5IU1CIifmXhqfyBKvCn0b2X1Ol/+Iu8R/Kl6HsRZJPswUOQo5We34kdLuW 2TtTo1Jkc2pgrbbdu5CyZLEI8NgwXgrEIxDWOhTawJqvhPukTQJg2pf+miMhn5edT9OV RoZGausAQo/C71+wZOsEkDkQEa5dxgHjZcx0gHwxna4f6hS0SDBj9bpqJwlBQ3RzALUq XatBFnskrgCbQABcHZNehPEo9idTGdTO9IAnsHBjZU3ccQFXOxsVJuGIK8NYpTgFh2YR NnqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 198-20020a6302cf000000b0055bdf89c9d8si3269822pgc.436.2023.07.21.08.51.06; Fri, 21 Jul 2023 08:51:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231610AbjGUPXT (ORCPT + 99 others); Fri, 21 Jul 2023 11:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232115AbjGUPXH (ORCPT ); Fri, 21 Jul 2023 11:23:07 -0400 Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB47E3586; Fri, 21 Jul 2023 08:22:42 -0700 (PDT) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-57045429f76so22851467b3.0; Fri, 21 Jul 2023 08:22:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689952933; x=1690557733; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bRpZOSTRgUgs93CpnfRqLnXeS2bgmI9aOiNkeLEthD0=; b=XQ7CpVXcAYdVCdo2OFMrd45xJEfSBe/FwYXkV3wY3/gWd18XyXUPQlux+CiXrLwp/1 iG00iJQ1m9dPHSBWILMLFxt75Q2gC9eBDrmrGugBHBw3zlj+Zc1OYqaYHUcd5hsRZ7ni QfCHkkB7y+MiUZ0yQuPLPo57sc/mYfpYPgKu8tm/PCz98z4v10agxkYV0oeSSTS8Tg0+ lFCMNyOcakoi+bc0NXJEdiG/M15TrkpYz2EfGqrXXhE2WOcrHnzq6GN277KMguzXLXHP veUlu1K0D6wxfyxxCK4uIeo8TA7SVLP3LALUHkm7yv0cDXhAnEs9P8zvWTWf0Nt14lip JkgQ== X-Gm-Message-State: ABy/qLbKkVRh+jrJCPWGA+pX9XQTq06fTJ/wqRR50Fn8Fs0MFpgo6HM+ U5/bWX4JLATKenfkvABNBTRM0bwnyBG/BQ== X-Received: by 2002:a0d:ff86:0:b0:577:2cac:cd4b with SMTP id p128-20020a0dff86000000b005772caccd4bmr482814ywf.7.1689952933290; Fri, 21 Jul 2023 08:22:13 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id m74-20020a0dca4d000000b0056d2a19ad91sm924478ywd.103.2023.07.21.08.22.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Jul 2023 08:22:12 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5701eaf0d04so22523007b3.2; Fri, 21 Jul 2023 08:22:12 -0700 (PDT) X-Received: by 2002:a81:4f44:0:b0:57a:5b6f:d41 with SMTP id d65-20020a814f44000000b0057a5b6f0d41mr358831ywb.42.1689952932202; Fri, 21 Jul 2023 08:22:12 -0700 (PDT) MIME-Version: 1.0 References: <20230711154449.1378385-1-eesposit@redhat.com> <0aa647f719103e8620d7209cbde40f04a7334749.camel@HansenPartnership.com> <635B383C-38A5-479E-80A6-358D5F90988B@oracle.com> <137ddc2957d43576afd37afb0bedab3ceea1f8d7.camel@HansenPartnership.com> In-Reply-To: From: Luca Boccassi Date: Fri, 21 Jul 2023 16:22:00 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2] x86/boot: add .sbat section to the bzImage To: James Bottomley Cc: Eric Snowberg , Ard Biesheuvel , =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Emanuele Giuseppe Esposito , "x86@kernel.org" , Thomas Gleixner , "lennart@poettering.net" , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andrew Morton , Masahiro Yamada , Alexander Potapenko , Nick Desaulniers , Vitaly Kuznetsov , open list , "linux-efi@vger.kernel.org" , "keyrings@vger.kernel.org" , Jarkko Sakkinen Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Jul 2023 at 16:14, Luca Boccassi wrote: > > On Fri, 21 Jul 2023 at 14:34, James Bottomley > wrote: > > > > On Fri, 2023-07-21 at 14:10 +0100, Luca Boccassi wrote: > > > On Fri, 21 Jul 2023 at 14:01, James Bottomley > > > wrote: > > [...] > > > > Well, my job is to be concerned about how individuals who want to > > > > own their own keys, either in MoK or db, participate in this, so I > > > > am mostly thinking about local signing. Whatever we decide, there > > > > must be a local workflow pathway. > > > > > > Sure but for local signing via MoK that's obviously fine, as one gets > > > to keep the pieces. AFAIK it's a different flow in Shim whether > > > something is authorized by MoK, DB or the built-in cert, so having > > > different policies built-in for those different cases should be > > > doable. Actually at the moment even if Shim loads the image, if it > > > gets authorized by DB .sbat isn't checked at all. > > > > So let's be sure we mean the same thing here. There is really no third > > party CA. Microsoft gives the distributions a signing key to allow > > them to sign their version of shim. Some distributions, like Red Hat, > > also embed their signing certificates in shim, so shim can distinguish > > between a RH key and another key added to MokList. However, some > > distributions, like SUSE, insist that all signing keys be approved by > > the machine owner (so no embedded shim certs for non-enterprise) and > > their shim can't distinguish between SUSE keys and machine owner > > additions. Given the variances in key handling, I think trying to > > distinguish between official and developer keys is a huge addition of > > complexity we don't need, so there has to be a workflow that functions > > for both and that workflow would seem to be allowing non-existent or > > empty sbat sections. Official key holders would *always* add sbat > > sections, so there's really no problem that needs a solution to be > > mandated here. > > The certificate is called the "Microsoft Corporation UEFI CA 2011" , > issued by the "Microsoft Corporation Third Party Marketplace Root". So > for short, we call it UEFI 3rd party CA :-) > Anyway, I wasn't aware that SUSE doesn't embed their cert in Shim, > we'll have to take that in consideration for sure. Actually, a dev from SUSE's security just confirmed they embed their CA in Shim like every other distribution. Nobody seems to be aware of any example where a distribution relies exclusively on MoK - and that's understandable, as that would mean failing to boot by default on a new machine. Do you have any example/cases where that's actually happening? Outside development/local signing/etc.