From: Nicolai Stange <nstange@suse.de>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: Nicolai Stange <nstange@suse.de>,
Roberto Sassu <roberto.sassu@huawei.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
Eric Snowberg <eric.snowberg@oracle.com>,
linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 6/7] ima: invalidate unsupported PCR banks once at first use
Date: Sun, 23 Mar 2025 15:21:31 +0100 [thread overview]
Message-ID: <871punddzo.fsf@> (raw)
In-Reply-To: <4e760360258bda56fbcb8f67e865a7a4574c305a.camel@linux.ibm.com> (Mimi Zohar's message of "Tue, 18 Mar 2025 16:49:57 -0400")
Mimi Zohar <zohar@linux.ibm.com> writes:
> On Tue, 2025-03-18 at 16:55 +0100, Nicolai Stange wrote:
>> Mimi Zohar <zohar@linux.ibm.com> writes:
>> > FYI, because the IMA Kconfig selects SHA1, we're guaranteed that SHA1 exists in
>> > the kernel and the subsequent kexec'ed kernel. For this reason we're guaranteed
>> > that the measurement list is complete. The simplest solution, not necessarily
>> > the best, would be to punt the problem for the time being by replacing the
>> > "select" with a different hash algorithm.
>>
>> Yes, that would work as well. IIUC, it would mean that we would
>> e.g. extend truncated SHA-256 template hashes into a SHA-1 bank, right?
>> However, since no existing tool like 'ima_measurement' is expecting
>> that, and would fail a verification then, I'm currently struggling to
>> see the advantage over just doing a.) and invalidating the PCR banks
>> with a fixed value right away?
>
> Replacing the "Kconfig select" has more to do with having at least one
> guaranteed complete measurement list. I'm fine with extending a TPM bank with
> an unknown kernel hash algorithm violation (either option a or b).
Ok, I think I got it now.
FWIW, a v2 can be found at
https://lore.kernel.org/r/20250323140911.226137-1-nstange@suse.de , including a
patch for selecting SHA256 now.
Thanks a lot for all your feedback!
Nicolai
--
SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nürnberg, Germany
GF: Ivo Totev, Andrew McDonald, Werner Knoblich
(HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2025-03-23 14:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 17:33 [RFC PATCH v1 0/7] ima: get rid of hard dependency on SHA-1 Nicolai Stange
2025-03-13 17:33 ` [RFC PATCH v1 1/7] ima: don't expose runtime_measurements for unsupported hashes Nicolai Stange
2025-03-13 17:33 ` [RFC PATCH v1 2/7] ima: always create runtime_measurements sysfs file for ima_hash Nicolai Stange
2025-03-13 17:33 ` [RFC PATCH v1 3/7] ima: move INVALID_PCR() to ima.h Nicolai Stange
2025-03-18 1:57 ` Mimi Zohar
2025-03-13 17:33 ` [RFC PATCH v1 4/7] ima: track the set of PCRs ever extended Nicolai Stange
2025-03-13 17:33 ` [RFC PATCH v1 5/7] tpm: enable bank selection for PCR extend Nicolai Stange
2025-03-13 17:33 ` [RFC PATCH v1 6/7] ima: invalidate unsupported PCR banks once at first use Nicolai Stange
2025-03-18 1:46 ` Mimi Zohar
2025-03-18 10:26 ` Nicolai Stange
2025-03-18 14:32 ` Mimi Zohar
2025-03-18 15:55 ` Nicolai Stange
2025-03-18 20:49 ` Mimi Zohar
2025-03-23 14:21 ` Nicolai Stange [this message]
2025-03-13 17:33 ` [RFC PATCH v1 7/7] ima: make SHA1 non-mandatory Nicolai Stange
2025-03-18 11:00 ` [RFC PATCH v1 0/7] ima: get rid of hard dependency on SHA-1 Roberto Sassu
2025-03-18 11:54 ` Nicolai Stange
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=871punddzo.fsf@ \
--to=nstange@suse.de \
--cc=dmitry.kasatkin@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=roberto.sassu@huawei.com \
--cc=zohar@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).