mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Merge tag 'integrity-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
Pull integrity subsystem updates from Mimi Zohar: - With commit099f26f22f("integrity: machine keyring CA configuration") certificates may be loaded onto the IMA keyring, directly or indirectly signed by keys on either the "builtin" or the "machine" keyrings. With the ability for the system/machine owner to sign the IMA policy itself without needing to recompile the kernel, update the IMA architecture specific policy rules to require the IMA policy itself be signed. [ As commit099f26f22fwas upstreamed in linux-6.4, updating the IMA architecture specific policy now to require signed IMA policies may break userspace expectations. ] - IMA only checked the file data hash was not on the system blacklist keyring for files with an appended signature (e.g. kernel modules, Power kernel image). Check all file data hashes regardless of how it was signed - Code cleanup, and a kernel-doc update * tag 'integrity-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: kexec_lock: Replace kexec_mutex() by kexec_lock() in two comments ima: require signed IMA policy when UEFI secure boot is enabled integrity: Always reference the blacklist keyring with appraisal ima: Remove deprecated IMA_TRUSTED_KEYRING Kconfig
This commit is contained in:
@@ -1280,7 +1280,7 @@ static bool ima_validate_rule(struct ima_rule_entry *entry)
|
||||
IMA_FSNAME | IMA_GID | IMA_EGID |
|
||||
IMA_FGROUP | IMA_DIGSIG_REQUIRED |
|
||||
IMA_PERMIT_DIRECTIO | IMA_VALIDATE_ALGOS |
|
||||
IMA_VERITY_REQUIRED))
|
||||
IMA_CHECK_BLACKLIST | IMA_VERITY_REQUIRED))
|
||||
return false;
|
||||
|
||||
break;
|
||||
@@ -1355,7 +1355,7 @@ static bool ima_validate_rule(struct ima_rule_entry *entry)
|
||||
|
||||
/* Ensure that combinations of flags are compatible with each other */
|
||||
if (entry->flags & IMA_CHECK_BLACKLIST &&
|
||||
!(entry->flags & IMA_MODSIG_ALLOWED))
|
||||
!(entry->flags & IMA_DIGSIG_REQUIRED))
|
||||
return false;
|
||||
|
||||
/*
|
||||
@@ -1803,11 +1803,11 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
|
||||
if (entry->flags & IMA_VERITY_REQUIRED)
|
||||
result = -EINVAL;
|
||||
else
|
||||
entry->flags |= IMA_DIGSIG_REQUIRED;
|
||||
entry->flags |= IMA_DIGSIG_REQUIRED | IMA_CHECK_BLACKLIST;
|
||||
} else if (strcmp(args[0].from, "sigv3") == 0) {
|
||||
/* Only fsverity supports sigv3 for now */
|
||||
if (entry->flags & IMA_VERITY_REQUIRED)
|
||||
entry->flags |= IMA_DIGSIG_REQUIRED;
|
||||
entry->flags |= IMA_DIGSIG_REQUIRED | IMA_CHECK_BLACKLIST;
|
||||
else
|
||||
result = -EINVAL;
|
||||
} else if (IS_ENABLED(CONFIG_IMA_APPRAISE_MODSIG) &&
|
||||
@@ -1816,18 +1816,13 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
|
||||
result = -EINVAL;
|
||||
else
|
||||
entry->flags |= IMA_DIGSIG_REQUIRED |
|
||||
IMA_MODSIG_ALLOWED;
|
||||
IMA_MODSIG_ALLOWED | IMA_CHECK_BLACKLIST;
|
||||
} else {
|
||||
result = -EINVAL;
|
||||
}
|
||||
break;
|
||||
case Opt_appraise_flag:
|
||||
ima_log_string(ab, "appraise_flag", args[0].from);
|
||||
if (IS_ENABLED(CONFIG_IMA_APPRAISE_MODSIG) &&
|
||||
strstr(args[0].from, "blacklist"))
|
||||
entry->flags |= IMA_CHECK_BLACKLIST;
|
||||
else
|
||||
result = -EINVAL;
|
||||
break;
|
||||
case Opt_appraise_algos:
|
||||
ima_log_string(ab, "appraise_algos", args[0].from);
|
||||
@@ -2271,8 +2266,6 @@ int ima_policy_show(struct seq_file *m, void *v)
|
||||
}
|
||||
if (entry->flags & IMA_VERITY_REQUIRED)
|
||||
seq_puts(m, "digest_type=verity ");
|
||||
if (entry->flags & IMA_CHECK_BLACKLIST)
|
||||
seq_puts(m, "appraise_flag=check_blacklist ");
|
||||
if (entry->flags & IMA_PERMIT_DIRECTIO)
|
||||
seq_puts(m, "permit_directio ");
|
||||
rcu_read_unlock();
|
||||
|
||||
Reference in New Issue
Block a user