[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXHcf_QptjHfFJxkUQrv=Lfg5=pkt2UTOZ5F-pffki-=-Q@mail.gmail.com>
Date: Thu, 10 Nov 2022 08:42:08 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Morten Linderud <morten@...derud.pw>
Cc: Eric Snowberg <eric.snowberg@...cle.com>, keyrings@...r.kernel.org,
linux-integrity@...r.kernel.org, zohar@...ux.ibm.com,
dhowells@...hat.com, dwmw2@...radead.org,
herbert@...dor.apana.org.au, davem@...emloft.net,
jarkko@...nel.org, jmorris@...ei.org, serge@...lyn.com,
keescook@...omium.org, torvalds@...ux-foundation.org,
weiyongjun1@...wei.com, nayna@...ux.ibm.com, ebiggers@...gle.com,
nramas@...ux.microsoft.com, lszubowi@...hat.com, jason@...c4.com,
linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-efi@...r.kernel.org, linux-security-module@...r.kernel.org,
James.Bottomley@...senpartnership.com, pjones@...hat.com,
konrad.wilk@...cle.com
Subject: Re: [PATCH v8 16/17] integrity: Trust MOK keys if MokListTrustedRT found
On Thu, 10 Nov 2022 at 01:01, Morten Linderud <morten@...derud.pw> wrote:
>
> On Tue, Nov 23, 2021 at 11:41:23PM -0500, Eric Snowberg wrote:
> > A new Machine Owner Key (MOK) variable called MokListTrustedRT has been
> > introduced in shim. When this UEFI variable is set, it indicates the
> > end-user has made the decision themselves that they wish to trust MOK keys
> > within the Linux trust boundary. It is not an error if this variable
> > does not exist. If it does not exist, the MOK keys should not be trusted
> > within the kernel.
>
> Hi Eric,
>
> I've been milling around on this patch-set for a while and I have a few issues
> with the description of the commit and what the code actually does.
>
> efi_mokvar_entry_find doesn't simply read an UEFI variable as the commit message
> suggests, it will look for the MOK variable loaded into the EFI configuration
> table. This implies we need this table setup in early boot to take usage of this
> patch set.
>
> The only bootloader that does setup this table, is the `shim` as described. But
> no other bootloader implements support for the MOK EFI configuration table.
>
Does any other bootloader implement support for the (volatile)
MokListTrustedRT variable?
Note that this variable is intentionally volatile, and should be
rejected by the kernel if it is not. The point of these RT variables
or the config tables is that they can only be set at boot if a signed
and therefore trusted agent created them.
Permitting non-volatile variables here defeats the purpose of secure
boot, which aims to prevent exploits from gaining persistence. It
would be bad if you could corrupt the trusted boot chain forever by
setting a variable once.
> This effectively means that there is still no way for Machine Owners to load
> keys into the keyring, for things like module signing, without the shim present
> in the bootchain. I find this a bit weird.
>
> Is this an intentional design decision, or could other ways be supported as
> well?
>
Yes.
If we are looking for a way to use EFI variables to inject additional
certificates into the keyring without the ability to authenticate
them, we should I'd strongly recommend that we disable that by default
and add a big fat warning that it is incompatible with the guarantees
secure boot aims to provide.
Powered by blists - more mailing lists