]> www.infradead.org Git - linux.git/commit
ipe: allow secondary and platform keyrings to install/update policies
authorLuca Boccassi <bluca@debian.org>
Sun, 15 Sep 2024 09:11:19 +0000 (11:11 +0200)
committerFan Wu <wufan@kernel.org>
Thu, 17 Oct 2024 18:46:10 +0000 (11:46 -0700)
commit02e2f9aa33e461468de02e35ad977bd7233960ae
tree1b05e9d1b3db1e4fb340f10111986e35ba59dec3
parent5ceecb301e50e933c1e621fbeea5ec239fbff858
ipe: allow secondary and platform keyrings to install/update policies

The current policy management makes it impossible to use IPE
in a general purpose distribution. In such cases the users are not
building the kernel, the distribution is, and access to the private
key included in the trusted keyring is, for obvious reason, not
available.
This means that users have no way to enable IPE, since there will
be no built-in generic policy, and no access to the key to sign
updates validated by the trusted keyring.

Just as we do for dm-verity, kernel modules and more, allow the
secondary and platform keyrings to also validate policies. This
allows users enrolling their own keys in UEFI db or MOK to also
sign policies, and enroll them. This makes it sensible to enable
IPE in general purpose distributions, as it becomes usable by
any user wishing to do so. Keys in these keyrings can already
load kernels and kernel modules, so there is no security
downgrade.

Add a kconfig each, like dm-verity does, but default to enabled if
the dependencies are available.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
[FW: fixed some style issues]
Signed-off-by: Fan Wu <wufan@kernel.org>
Documentation/admin-guide/LSM/ipe.rst
security/ipe/Kconfig
security/ipe/policy.c