Skip to content

Commit 56dc986

Browse files
coibymimizohar
authored andcommitted
ima: require signed IMA policy when UEFI secure boot is enabled
With commit 099f26f ("integrity: machine keyring CA configuration"), users are able to add custom IMA CA keys via MOK. This allows users to sign their own IMA polices without recompiling the kernel. For the sake of security, mandate signed IMA policy when UEFI secure boot is enabled. Note this change may affect existing users/tests i.e users won't be able to load an unsigned IMA policy when the IMA architecture specific policy is configured and UEFI secure boot is enabled. Suggested-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Coiby Xu <coxu@redhat.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
1 parent f20765f commit 56dc986

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

security/integrity/ima/ima_efi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ static const char * const sb_arch_rules[] = {
5757
"measure func=KEXEC_KERNEL_CHECK",
5858
#if !IS_ENABLED(CONFIG_MODULE_SIG)
5959
"appraise func=MODULE_CHECK appraise_type=imasig",
60+
#endif
61+
#if IS_ENABLED(CONFIG_INTEGRITY_MACHINE_KEYRING) && IS_ENABLED(CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY)
62+
"appraise func=POLICY_CHECK appraise_type=imasig",
6063
#endif
6164
"measure func=MODULE_CHECK",
6265
NULL

0 commit comments

Comments
 (0)