[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <100B070F-7EB4-4BF7-B2B9-E5AE78D3066A@oracle.com>
Date: Mon, 10 Jan 2022 23:25:03 +0000
From: Eric Snowberg <eric.snowberg@...cle.com>
To: Mimi Zohar <zohar@...ux.ibm.com>
CC: David Howells <dhowells@...hat.com>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"ardb@...nel.org" <ardb@...nel.org>,
Jarkko Sakkinen <jarkko@...nel.org>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"serge@...lyn.com" <serge@...lyn.com>,
"nayna@...ux.ibm.com" <nayna@...ux.ibm.com>,
"keescook@...omium.org" <keescook@...omium.org>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"weiyongjun1@...wei.com" <weiyongjun1@...wei.com>,
"keyrings@...r.kernel.org" <keyrings@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"James.Bottomley@...senpartnership.com"
<James.Bottomley@...senPartnership.com>,
"pjones@...hat.com" <pjones@...hat.com>,
Konrad Wilk <konrad.wilk@...cle.com>
Subject: Re: [PATCH v9 2/8] integrity: Introduce a Linux keyring called
machine
> On Jan 9, 2022, at 2:57 PM, Mimi Zohar <zohar@...ux.ibm.com> wrote:
>
> On Wed, 2022-01-05 at 18:50 -0500, Eric Snowberg wrote:
>> Many UEFI Linux distributions boot using shim. The UEFI shim provides
>> what is called Machine Owner Keys (MOK). Shim uses both the UEFI Secure
>> Boot DB and MOK keys to validate the next step in the boot chain. The
>> MOK facility can be used to import user generated keys. These keys can
>> be used to sign an end-users development kernel build. When Linux
>> boots, both UEFI Secure Boot DB and MOK keys get loaded in the Linux
>> .platform keyring.
>>
>> Define a new Linux keyring called machine. This keyring shall contain just
>> MOK CA keys and not the remaining keys in the platform keyring. This new
>> machine keyring will be used in follow on patches. Unlike keys in the
>> platform keyring, keys contained in the machine keyring will be trusted
>> within the kernel if the end-user has chosen to do so.
>
> True, from an IMA perspective only the CA keys should be loaded onto
> the .machine keyring, but this version (v9) of the patch set does not
> enforce that. The patch set and this paragraph are out of sync.
I missed that when I dropped IMA support. I will strike that sentence
in the next round. Or if no code changes are identified, feel free to
remove that sentence.
> Jarkko, my concern is that once this version of the patch set is
> upstreamed, would limiting which keys may be loaded onto the .machine
> keyring be considered a regression?
Currently certificates built into the kernel do not have a CA restriction on them.
IMA will trust anything in this keyring even if the CA bit is not set. While it would
be advisable for a kernel to be built with a CA, nothing currently enforces it.
My thinking for the dropped CA restriction patches was to introduce a new Kconfig.
This Kconfig would do the CA enforcement on the machine keyring. However if the
Kconfig option was not set for enforcement, it would work as it does in this series,
plus it would allow IMA to work with non-CA keys. This would be done by removing
the restriction placed in this patch. Let me know your thoughts on whether this would
be an appropriate solution. I believe this would get around what you are identifying as
a possible regression.
Powered by blists - more mailing lists