]> www.infradead.org Git - users/hch/dma-mapping.git/commit
dm verity: add support for signature verification with platform keyring
authorLuca Boccassi <bluca@debian.org>
Tue, 2 Jul 2024 16:16:57 +0000 (18:16 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 3 Jul 2024 19:41:11 +0000 (21:41 +0200)
commit6fce1f40e95182ebbfe1ee3096b8fc0b37903269
tree3c0312d650c53b0d0e5601b92a31fa70536e42e1
parent3199a34bfaf7561410e0be1e33a61eba870768fc
dm verity: add support for signature verification with platform keyring

Add a new configuration CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_PLATFORM_KEYRING
that enables verifying dm-verity signatures using the platform keyring,
which is populated using the UEFI DB certificates. This is useful for
self-enrolled systems that do not use MOK, as the secondary keyring which
is already used for verification, if the relevant kconfig is enabled, is
linked to the machine keyring, which gets its certificates loaded from MOK.
On datacenter/virtual/cloud deployments it is more common to deploy one's
own certificate chain directly in DB on first boot in unattended mode,
rather than relying on MOK, as the latter typically requires interactive
authentication to enroll, and is more suited for personal machines.

Default to the same value as DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
if not otherwise specified, as it is likely that if one wants to use
MOK certificates to verify dm-verity volumes, DB certificates are
going to be used too. Keys in DB are allowed to load a full kernel
already anyway, so they are already highly privileged.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/Kconfig
drivers/md/dm-verity-verify-sig.c