Linux-Integrity Archive on lore.kernel.org
 help / color / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: Roberto Sassu <roberto.sassu@huawei.com>,
	Vitaly Chikunov <vt@altlinux.org>,
	Patrick Uiterwijk <puiterwi@redhat.com>,
	Lakshmi Ramasubramanian <nramas@linux.microsoft.com>,
	Mimi Zohar <zohar@linux.ibm.com>
Subject: [RFC PATCH 0/3] boot aggregate test
Date: Wed, 25 Mar 2020 18:26:14 -0400
Message-ID: <1585175177-20739-1-git-send-email-zohar@linux.ibm.com> (raw)

The "boot_aggregate" contained in the IMA measurement list has always been
a SHA1 hash.  With Roberto's "ima: support stronger algorithms for
attestation" patch set, the hash algorithm used to calculate the
"boot_aggregate" will either be the IMA default hash algorithm or fall
back to using SHA1 for TPM 1.2 or SHA256 for TPM 2.0, assuming a SHA256
TPM bank exists.

This test may be used to verify the "boot_aggregate" based on a physical
TPM or a software TPM.  If a software TPM is not running on the system,
one is started and initialized by walking a sample
binary_bios_measurements log and extending the software TPM with those
values.  The "boot_aggregate" is then calculated and compared against the
sample ascii_runtime_measurements record.

This test depends on Vitaly's "ima-evm-utils: Add some tests for evmctl"
patch being upstreamed.  I would appreciate some review on both his patch
and on this patch set.  To help facilitate this review, I've pushed out a
next-testing topic branch.  Included in this topic branch is Patrick
Uiterwijk's support for reading the TPM PCRs using Intel's TSS2.

Thanks!

Mimi

Mimi Zohar (3):
  ima-evm-utils: tests: verify boot_aggregate
  ima-evm-utils: tests: verify the last "boot_aggregate" record
  ima_evm_utils: tests: color boot_aggregate.test tty output

 tests/Makefile.am                     |   2 +-
 tests/boot_aggregate.test             | 150 ++++++++++++++++++++++++++++++++++
 tests/test_ascii_runtime_measurements |   3 +
 tests/test_binary_bios_measurements   | Bin 0 -> 23248 bytes
 4 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100755 tests/boot_aggregate.test
 create mode 100644 tests/test_ascii_runtime_measurements
 create mode 100644 tests/test_binary_bios_measurements

-- 
2.7.5


             reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 22:26 Mimi Zohar [this message]
2020-03-25 22:26 ` [RFC PATCH 1/3] ima-evm-utils: tests: verify boot_aggregate Mimi Zohar
2020-03-25 22:26 ` [RFC PATCH 2/3] ima-evm-utils: tests: verify the last "boot_aggregate" record Mimi Zohar
2020-03-25 22:26 ` [RFC PATCH 3/3] ima_evm_utils: tests: color boot_aggregate.test tty output 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=1585175177-20739-1-git-send-email-zohar@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=nramas@linux.microsoft.com \
    --cc=puiterwi@redhat.com \
    --cc=roberto.sassu@huawei.com \
    --cc=vt@altlinux.org \
    /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

Linux-Integrity Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-integrity/0 linux-integrity/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-integrity linux-integrity/ https://lore.kernel.org/linux-integrity \
		linux-integrity@vger.kernel.org
	public-inbox-index linux-integrity

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-integrity


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git