diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2017-05-16 14:53:47 +0200 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2017-06-21 14:37:12 -0400 |
commit | e4586c79d4ba24a02f63a17e49207007c3bbdaea (patch) | |
tree | 92c100579c956bd745aed150c01200ed2c3f362a /security | |
parent | 28a8dc41279de2a8a635df51ad33d3cee7e0c0d1 (diff) | |
download | talos-obmc-linux-e4586c79d4ba24a02f63a17e49207007c3bbdaea.tar.gz talos-obmc-linux-e4586c79d4ba24a02f63a17e49207007c3bbdaea.zip |
ima: fix get_binary_runtime_size()
Remove '+ 1' from 'size += strlen(entry->template_desc->name) + 1;',
as the template name is sent to userspace without the '\0' character.
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c index d9aa5ab71204..a02a86d51102 100644 --- a/security/integrity/ima/ima_queue.c +++ b/security/integrity/ima/ima_queue.c @@ -81,7 +81,7 @@ static int get_binary_runtime_size(struct ima_template_entry *entry) size += sizeof(u32); /* pcr */ size += sizeof(entry->digest); size += sizeof(int); /* template name size field */ - size += strlen(entry->template_desc->name) + 1; + size += strlen(entry->template_desc->name); size += sizeof(entry->template_data_len); size += entry->template_data_len; return size; |