summaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_api.c
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@polito.it>2013-11-08 19:21:39 +0100
committerMimi Zohar <zohar@linux.vnet.ibm.com>2013-11-25 07:26:28 -0500
commitb6f8f16f41d92861621b043389ef49de1c52d613 (patch)
tree4aa54f988efc980c6f5ec7845fda7761fa667c16 /security/integrity/ima/ima_api.c
parent4c1cc40a2d49500d84038ff751bc6cd183e729b5 (diff)
downloadop-kernel-dev-b6f8f16f41d92861621b043389ef49de1c52d613.zip
op-kernel-dev-b6f8f16f41d92861621b043389ef49de1c52d613.tar.gz
ima: do not include field length in template digest calc for ima template
To maintain compatibility with userspace tools, the field length must not be included in the template digest calculation for the 'ima' template. Fixes commit: a71dc65 ima: switch to new template management mechanism Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r--security/integrity/ima/ima_api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
index 0e75408..8037484 100644
--- a/security/integrity/ima/ima_api.c
+++ b/security/integrity/ima/ima_api.c
@@ -94,6 +94,7 @@ int ima_store_template(struct ima_template_entry *entry,
/* this function uses default algo */
hash.hdr.algo = HASH_ALGO_SHA1;
result = ima_calc_field_array_hash(&entry->template_data[0],
+ entry->template_desc,
num_fields, &hash.hdr);
if (result < 0) {
integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode,
OpenPOWER on IntegriCloud