From: Eric Snowberg <eric.snowberg@oracle.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: "open list:SECURITY SUBSYSTEM"
<linux-security-module@vger.kernel.org>,
David Howells <dhowells@redhat.com>,
David Woodhouse <dwmw2@infradead.org>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"davem@davemloft.net" <davem@davemloft.net>,
Ard Biesheuvel <ardb@kernel.org>,
Jarkko Sakkinen <jarkko@kernel.org>,
Paul Moore <paul@paul-moore.com>,
"jmorris@namei.org" <jmorris@namei.org>,
"serge@hallyn.com" <serge@hallyn.com>,
"zohar@linux.ibm.com" <zohar@linux.ibm.com>,
"roberto.sassu@huawei.com" <roberto.sassu@huawei.com>,
"dmitry.kasatkin@gmail.com" <dmitry.kasatkin@gmail.com>,
"mic@digikod.net" <mic@digikod.net>,
"casey@schaufler-ca.com" <casey@schaufler-ca.com>,
"stefanb@linux.ibm.com" <stefanb@linux.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>
Subject: Re: [PATCH RFC 8/8] clavis: Introduce new LSM called clavis
Date: Tue, 12 Mar 2024 14:04:42 +0000 [thread overview]
Message-ID: <C9A0995A-2390-486F-99EF-89098E78021A@oracle.com> (raw)
In-Reply-To: <50ec3230-c2c9-4c16-899e-d93d164a3e79@infradead.org>
> On Mar 11, 2024, at 8:45 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 3/11/24 09:11, Eric Snowberg wrote:
>> In the future it is envisioned this LSM could be enhanced to provide
>> access control for UEFI Secure Boot Advanced Targeting (SBAT). Using
>> the same clavis= boot param and storing the additional contents within
>> the new RT UEFI var, SBAT restrictions could be maintained across kexec.
>
> What does "RT" mean here?
I will define it in the next round. It stands for Run-Time.
>> +
>> +Clavis is a Linux Security Module that provides mandatory access control to
>> +system kernel keys (i.e. builtin, secondary, machine and platform). These
>> +restrictions will prohit keys from being used for validation. Upon boot, the
>
> prohibit
I will fix this spelling error and all the others you identified below.
>
>> +Clavis LSM is provided a key id as a boot param. This single key is then
>> +used as the root of trust for any access control modifications made going
>> +forward. Access control updates must be signed and validated by this key.
>> +
>> +Clavis has its own keyring. All ACL updates are applied through this keyring.
>> +The update must be signed by the single root of trust key.
>> +
>> +When enabled, all system keys are prohibited from being used until an ACL is
>> +added for it. There is two exceptions to this rule, builtin keys may be used
>
> What is "it"? The predecessor seems to be "all system keys" (plural).
The word "for" should be "to" above. The sentence should be:
When enabled, all system keys are prohibited from being used until an ACL is
added to it.
>> +
>> +The Clavis LSM contains a system keyring call .clavis. It contains a single
>> +asymmetric key that is use to validate anything added to it. This key can only
>> +be added during boot and must be a preexisting system kernel key. If the
>> +clavis= boot param is not used, the keyring does not exist and the feature
>> +can not be used until the next power on reset.
>
> So just a reboot won't cause it to be used? Must be power off/on?
A reboot would too. I will rework this sentence. I just want to show that doing a kexec
can not be used to make changes to the root of trust.
>> diff --git a/security/security.c b/security/security.c
>> index 4cb832b00c40..d1da60a1b7a4 100644
>> --- a/security/security.c
>> +++ b/security/security.c
>
>> @@ -5313,6 +5314,19 @@ void security_key_post_create_or_update(struct key *keyring, struct key *key,
>> call_void_hook(key_post_create_or_update, keyring, key, payload,
>> payload_len, flags, create);
>> }
>> +
>> +/**
>> + * security_key_verify_signature - verify signature
>> + * @key: key
>> + * @public_key_signature: signature
>
> Above should be "@sig:".
I will fix that too. Thanks for your review.
prev parent reply other threads:[~2024-03-12 14:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 16:11 [PATCH RFC 0/8] Clavis LSM Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 1/8] certs: Introduce ability to link to a system key Eric Snowberg
2024-03-11 19:16 ` Jarkko Sakkinen
2024-03-11 21:29 ` Eric Snowberg
2024-03-11 19:18 ` Jarkko Sakkinen
2024-03-11 21:31 ` Eric Snowberg
2024-03-12 15:18 ` Jarkko Sakkinen
2024-03-12 6:00 ` [EXTERNAL] " Bharat Bhushan
2024-04-04 22:40 ` Mimi Zohar
2024-04-05 12:56 ` Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 2/8] clavis: Introduce a new system keyring called clavis Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 3/8] efi: Make clavis boot param persist across kexec Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 4/8] clavis: Prevent clavis boot param from changing during kexec Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 5/8] keys: Add new verification type (VERIFYING_CLAVIS_SIGNATURE) Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 6/8] keys: Add ability to track intended usage of the public key Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 7/8] clavis: Introduce a new key type called clavis_key_acl Eric Snowberg
2024-03-11 16:11 ` [PATCH RFC 8/8] clavis: Introduce new LSM called clavis Eric Snowberg
2024-03-12 2:45 ` Randy Dunlap
2024-03-12 14:04 ` Eric Snowberg [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=C9A0995A-2390-486F-99EF-89098E78021A@oracle.com \
--to=eric.snowberg@oracle.com \
--cc=ardb@kernel.org \
--cc=casey@schaufler-ca.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=dwmw2@infradead.org \
--cc=herbert@gondor.apana.org.au \
--cc=jarkko@kernel.org \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=paul@paul-moore.com \
--cc=rdunlap@infradead.org \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
--cc=stefanb@linux.ibm.com \
--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