From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
"Bruno E . O . Meneguele" <brdeoliv@redhat.com>,
Mimi Zohar <zohar@linux.vnet.ibm.com>
Subject: [PATCH 01/10] ima-evm-utils: fix "ima_measurement" template fields length
Date: Mon, 22 Jan 2018 09:53:56 -0500 [thread overview]
Message-ID: <1516632845-7087-2-git-send-email-zohar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1516632845-7087-1-git-send-email-zohar@linux.vnet.ibm.com>
The template data field length is uint32_t, not uint8_t.
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
---
src/evmctl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/evmctl.c b/src/evmctl.c
index 313a0c5..a6c6e01 100644
--- a/src/evmctl.c
+++ b/src/evmctl.c
@@ -1342,7 +1342,7 @@ void ima_ng_show(struct template_entry *entry)
char *algo, *path;
/* get binary digest */
- field_len = *(uint8_t *)fieldp;
+ field_len = *(uint32_t *)fieldp;
fieldp += sizeof(field_len);
total_len -= sizeof(field_len);
@@ -1356,7 +1356,7 @@ void ima_ng_show(struct template_entry *entry)
total_len -= field_len;
/* get path */
- field_len = *(uint8_t *)fieldp;
+ field_len = *(uint32_t *)fieldp;
fieldp += sizeof(field_len);
total_len -= sizeof(field_len);
@@ -1368,7 +1368,7 @@ void ima_ng_show(struct template_entry *entry)
if (!strcmp(entry->name, "ima-sig")) {
/* get signature */
- field_len = *(uint8_t *)fieldp;
+ field_len = *(uint32_t *)fieldp;
fieldp += sizeof(field_len);
total_len -= sizeof(field_len);
--
2.7.4
next prev parent reply other threads:[~2018-01-22 14:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 14:53 [PATCH 00/10] ima-evm-utils Mimi Zohar
2018-01-22 14:53 ` Mimi Zohar [this message]
2018-01-22 14:53 ` [PATCH 02/10] ima-evm-utils: revert the change to use printf instead of log_info() Mimi Zohar
2018-01-22 14:53 ` [PATCH 03/10] ima-evm-utils: fix spelling error Mimi Zohar
2018-01-22 14:53 ` [PATCH 04/10] ima-evm-utils: remove the unnecessary display of the keyid Mimi Zohar
2018-01-22 14:54 ` [PATCH 05/10] ima-evm-utils: support verifying the measurement list using multiple keys Mimi Zohar
2018-01-22 14:54 ` [PATCH 06/10] ima-evm-utils: indicate measurement list signature verification failure Mimi Zohar
2018-01-22 14:54 ` [PATCH 07/10] ima-evm-utils: add support for specifying the pcr file location Mimi Zohar
2018-01-22 14:54 ` [PATCH 08/10] ima-evm-utils: verify the measurement list signature based on the list digest Mimi Zohar
2018-01-22 14:54 ` [PATCH 09/10] ima-evm-utils: verify IMA file hashes stored as xattrs Mimi Zohar
2018-01-22 14:54 ` [PATCH 10/10] ima-evm-utils: add support for validating multiple pcrs Mimi Zohar
2018-01-28 19:01 ` [PATCH 00/10] ima-evm-utils Mimi Zohar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516632845-7087-2-git-send-email-zohar@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=brdeoliv@redhat.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=linux-integrity@vger.kernel.org \
--cc=roberto.sassu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.