linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elaine Palmer <erpalmer@linux.vnet.ibm.com>
To: Eric Snowberg <eric.snowberg@oracle.com>,
	jarkko Sakkinen <jarkko@kernel.org>,
	Mimi Zohar <zohar@linux.ibm.com>,
	Elaine Palmer <erpalmerny@gmail.com>
Cc: Coiby Xu <coxu@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	David Howells <dhowells@redhat.com>,
	"dmitry.kasatkin@gmail.com" <dmitry.kasatkin@gmail.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"jmorris@namei.org" <jmorris@namei.org>,
	Konrad Wilk <konrad.wilk@oracle.com>,
	Kanth Ghatraju <kanth.ghatraju@oracle.com>,
	"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	Lakshmi Ramasubramanian <nramas@linux.microsoft.com>,
	"pvorel@suse.cz" <pvorel@suse.cz>,
	Roberto Sassu <roberto.sassu@huawei.com>,
	"serge@hallyn.com" <serge@hallyn.com>,
	"tiwai@suse.de" <tiwai@suse.de>,
	"erpalmer@linux.ibm.com" <erpalmer@linux.ibm.com>
Subject: Re: [PATCH 0/7] Add CA enforcement keyring restrictions
Date: Wed, 9 Nov 2022 09:58:26 -0500	[thread overview]
Message-ID: <eecf9ec4-2415-1e41-014e-e145d6ab44b4@linux.vnet.ibm.com> (raw)
In-Reply-To: <82E1339C-629A-48F5-99B0-179251BBC708@oracle.com>



On 2022/11/09 9:25 AM, Eric Snowberg wrote:
>
>> On Nov 8, 2022, at 6:24 PM, Elaine Palmer <erpalmerny@gmail.com> wrote:
>>
>>
>>
>> On 2022/11/04 9:20 AM, Coiby Xu wrote:
>>> Hi Eric,
>>>
>>> I wonder if there is any update on this work? I would be glad to do
>>> anything that may be helpful including testing a new version of code.
>>>
>> Hi Coiby,
>>
>> Yes, this discussion got stuck when we couldn't agree on one of the
>> following options:
>>
>> (A) Filter which keys from MOK (or a management system) are loaded
>>     onto the .machine keyring. Specifically, load only keys with
>>     CA+keyCertSign attributes.
>>
>> (B) Load all keys from MOK (or a management system) onto the
>>     .machine keyring. Then, subsequently filter those to restrict
>>     which ones can be loaded onto the .ima keyring specifically.
>>
>> The objection to (A) was that distros would have to go through
>> two steps instead of one to load keys. The one-step method of
>> loading keys was supported by an out-of-tree patch and then by
>> the addition of the .machine keyring.
>>
>> The objection to (B) was that, because the .machine keyring is now
>> linked to the .secondary keyring, it expands the scope of what the
>> kernel has trusted in the past. The effect is that keys in MOK
>> have the same broad scope as keys previously restricted to
>> .builtin and .secondary. It doesn't affect just IMA, but the rest
>> of the kernel as well.
>>
>> I would suggest that we can get unstuck by considering:
>>
>> (C) Defining a systemd (or dracut module) to load keys onto the
>>     .secondary keyring
>>
>> (D) Using a configuration option to specify what types of
>>     .machine keys should be allowed to pass through to the
>>     .secondary keyring.
>>    
>>     The distro could choose (A) by allowing only
>>     CA+keyCertSign keys.
>>
>>     The distro could choose (B) by allowing any kind
>>     of key.
>>
>> We all seemed to agree that enforcing key usage should be
>> implemented and that a useful future effort is to add policies
>> to keys and keyrings, like, "This key can only be used for
>> verifying kernel modules."
>>
>> I hope we can come to an agreement so work can proceed and IMA
>> can be re-enabled.
> I would be open to making the changes necessary to support both (A and B) 
> options.  What type of configuration option would be considered?  Would this 
> be a compile time Kconfig, a Linux boot command line parameter, or another 
> MOK variable?
>
Thank you, Eric.  A compile time Kconfig would be the most secure, yet
would still support (B) when allowed.

      reply	other threads:[~2022-11-09 14:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06  1:53 [PATCH 0/7] Add CA enforcement keyring restrictions Eric Snowberg
2022-04-06  1:53 ` [PATCH 1/7] KEYS: Create static version of public_key_verify_signature Eric Snowberg
2022-04-06  1:53 ` [PATCH 2/7] KEYS: X.509: Parse Basic Constraints for CA Eric Snowberg
2022-04-08 14:39   ` Mimi Zohar
2022-04-08 15:31     ` Eric Snowberg
2022-04-06  1:53 ` [PATCH 3/7] KEYS: X.509: Parse Key Usage Eric Snowberg
2022-04-08 14:39   ` Mimi Zohar
2022-04-06  1:53 ` [PATCH 4/7] KEYS: Introduce a builtin root of trust key flag Eric Snowberg
2022-04-08 14:40   ` Mimi Zohar
2022-04-08 15:27     ` Eric Snowberg
2022-04-08 16:55       ` Mimi Zohar
2022-04-08 17:34         ` Eric Snowberg
2022-04-08 18:49           ` Mimi Zohar
2022-04-08 21:59             ` Eric Snowberg
2022-04-11 15:30               ` Mimi Zohar
2022-04-14 16:36                 ` Eric Snowberg
2022-04-14 18:09                   ` Mimi Zohar
2022-04-14 21:59                     ` Eric Snowberg
2022-04-15 16:14                       ` Mimi Zohar
2022-04-06  1:53 ` [PATCH 5/7] KEYS: Introduce sig restriction that validates root of trust Eric Snowberg
2022-04-06 19:55   ` kernel test robot
2022-04-06  1:53 ` [PATCH 6/7] KEYS: X.509: Flag Intermediate CA certs as built in Eric Snowberg
2022-04-07  1:04   ` kernel test robot
2022-04-06  1:53 ` [PATCH 7/7] integrity: Use root of trust signature restriction Eric Snowberg
2022-04-06 20:45 ` [PATCH 0/7] Add CA enforcement keyring restrictions Mimi Zohar
2022-04-06 22:53   ` Eric Snowberg
2022-04-08 14:41     ` Mimi Zohar
2022-11-04 13:20 ` Coiby Xu
2022-11-04 21:06   ` Eric Snowberg
2022-11-09  1:24   ` Elaine Palmer
2022-11-09 14:25     ` Eric Snowberg
2022-11-09 14:58       ` Elaine Palmer [this message]

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=eecf9ec4-2415-1e41-014e-e145d6ab44b4@linux.vnet.ibm.com \
    --to=erpalmer@linux.vnet.ibm.com \
    --cc=coxu@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=eric.snowberg@oracle.com \
    --cc=erpalmer@linux.ibm.com \
    --cc=erpalmerny@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko@kernel.org \
    --cc=jmorris@namei.org \
    --cc=kanth.ghatraju@oracle.com \
    --cc=keyrings@vger.kernel.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=nramas@linux.microsoft.com \
    --cc=pvorel@suse.cz \
    --cc=roberto.sassu@huawei.com \
    --cc=serge@hallyn.com \
    --cc=tiwai@suse.de \
    --cc=zohar@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).