aboutsummaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_template.c
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2021-05-14 17:27:52 +0200
committerMimi Zohar <zohar@linux.ibm.com>2021-06-01 12:30:51 -0400
commit026d7fc92a9d629630779c999fe49ecae93f9d63 (patch)
treee54222a44f2739b05f274e68ed87a84d86e75e97 /security/integrity/ima/ima_template.c
parentima: Allow imasig requirement to be satisfied by EVM portable signatures (diff)
downloadlinux-dev-026d7fc92a9d629630779c999fe49ecae93f9d63.tar.xz
linux-dev-026d7fc92a9d629630779c999fe49ecae93f9d63.zip
ima: Introduce template field evmsig and write to field sig as fallback
With the patch to accept EVM portable signatures when the appraise_type=imasig requirement is specified in the policy, appraisal can be successfully done even if the file does not have an IMA signature. However, remote attestation would not see that a different signature type was used, as only IMA signatures can be included in the measurement list. This patch solves the issue by introducing the new template field 'evmsig' to show EVM portable signatures and by including its value in the existing field 'sig' if the IMA signature is not found. Suggested-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_template.c')
-rw-r--r--security/integrity/ima/ima_template.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_template.c b/security/integrity/ima/ima_template.c
index 4e081e650047..7a60848c04a5 100644
--- a/security/integrity/ima/ima_template.c
+++ b/security/integrity/ima/ima_template.c
@@ -45,6 +45,8 @@ static const struct ima_template_field supported_fields[] = {
.field_show = ima_show_template_digest_ng},
{.field_id = "modsig", .field_init = ima_eventmodsig_init,
.field_show = ima_show_template_sig},
+ {.field_id = "evmsig", .field_init = ima_eventevmsig_init,
+ .field_show = ima_show_template_sig},
};
/*