lkml.org 
[lkml]   [2019]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/4] KEYS: Added BUILTIN_TRUSTED_KEYS enum to measure keys added to builtin_trusted_keys keyring
From
Date
On 10/27/19 7:33 AM, Mimi Zohar wrote:

> Other examples of trusted keyrings are: .ima, .evm, .platform,
> .blacklist, .builtin_regdb_keys.  Instead of defining a keyring
> specific method of getting the keyring number, define a generic
> method.  For example, the userspace command "keyctl describe
> %keyring:.builtin_trusted_keys" searches /proc/keys, but the kernel
> shouldn't need to access /proc/keys.

"description" field in "struct key" is set to ".builtin_trusted_keys"
for Built-In Trusted Keys keyring.

Similarly, for other keyrings such as .ima, .evm, .blacklist,
.builtin_regdb_keys, etc.

> # measure keys on the BUILTIN and IMA keyrings into a different PCR
> measure func=KEYRING_CHECK keyring=".builtin_trusted_keys|.ima" pcr=11

With IMA policy set like above, the keyring to keyring number mapping
can be set at IMA policy load.

My earlier point about mapping the "keyring" to "keyring number" at
runtime (when the IMA hook is called) still needs to be done to know if
the given keyring is in the policy or not.

void ima_post_key_create_or_update(struct key *keyring, struct key *key,
unsigned long flags, bool create)

thanks,
-lakshmi

\
 
 \ /
  Last update: 2019-10-28 16:57    [W:0.108 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site