From: Eric Biggers <ebiggers@kernel.org>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: "Simo Sorce" <simo@redhat.com>, "Coiby Xu" <coxu@redhat.com>,
"Johannes Wiesböck" <johannes.wiesboeck@aisec.fraunhofer.de>,
dhowells@redhat.com, dmitry.kasatkin@gmail.com,
eric.snowberg@oracle.com, keyrings@vger.kernel.org,
linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org,
roberto.sassu@huawei.com, zohar@linux.ibm.com,
michael.weiss@aisec.fraunhofer.de
Subject: Re: IMA and PQC
Date: Thu, 26 Feb 2026 10:32:48 -0800 [thread overview]
Message-ID: <20260226183248.GE2251@sol> (raw)
In-Reply-To: <969c74f3-81ed-442c-87dd-381274a642a7@linux.ibm.com>
On Thu, Feb 26, 2026 at 12:22:32PM -0500, Stefan Berger wrote:
> > I see that IMA indeed never upgraded full file hashes to use
> > 'struct ima_file_id'. Building a new feature that relies on this seems
> > like a bad idea though, given that it's a security bug that makes the> IMA
> protocol cryptographically ambiguous. I.e., it means that in IMA,
> > when the contents of some file are signed, that signature is sometimes
> > also valid for some other file contents which the signer didn't intend.
>
> You mean IMA should not sign the digest in the ima_file_id structure but
> hash the ima_file_id structure in which this file digest is written into
> (that we currently sign) and sign/verify this digest? And we would do this
> to avoid two different files (with presumably different content) from having
> the same hashes leading to the same signature? Which hashes (besides the
> non-recommended ones) are so weak now that you must not merely sign a file's
> hash?
>
> The problem with this is that older kernels (without patching) won't be able
> to handle newer signatures.
IMA needs to sign the entire ima_file_id structure, which is indeed what
IMA already does when it uses that structure. (Well, actually it signs
a hash of the struct, but that's best thought of an implementation
detail of legacy signature algorithms that can only sign hashes. For a
modern algorithm the whole struct should be passed instead.) Just IMA
uses that structure only for fsverity hashes, which is a bug that makes
the IMA protocol ambiguous. It needs to use ima_file_id consistently,
otherwise a signed message sometimes corresponds to multiple unique file
contents even without a break in the cryptographic hash function.
Sure, when that bug is fixed, old kernels won't support the new
signatures for files that use a full-file hash. But the same applies to
starting to use a new signature algorithm, such as ML-DSA.
- Eric
next prev parent reply other threads:[~2026-02-26 18:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 17:43 IMA and PQC David Howells
2026-01-26 21:04 ` Mimi Zohar
2026-01-26 21:36 ` David Howells
2026-01-26 22:54 ` Mimi Zohar
2026-01-30 11:17 ` Coiby Xu
2026-01-30 14:10 ` David Howells
2026-02-03 13:43 ` Coiby Xu
2026-01-30 20:31 ` Johannes Wiesböck
2026-02-03 13:32 ` Coiby Xu
2026-02-25 14:25 ` Stefan Berger
2026-02-26 0:10 ` Eric Biggers
2026-02-26 12:42 ` Stefan Berger
2026-02-26 14:16 ` Stefan Berger
2026-02-26 15:27 ` Simo Sorce
2026-02-26 16:58 ` Eric Biggers
2026-02-26 17:22 ` Stefan Berger
2026-02-26 18:32 ` Eric Biggers [this message]
2026-02-26 19:21 ` Stefan Berger
2026-02-26 19:44 ` Eric Biggers
2026-02-26 21:05 ` Stefan Berger
2026-02-26 18:42 ` Simo Sorce
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=20260226183248.GE2251@sol \
--to=ebiggers@kernel.org \
--cc=coxu@redhat.com \
--cc=dhowells@redhat.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=johannes.wiesboeck@aisec.fraunhofer.de \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=michael.weiss@aisec.fraunhofer.de \
--cc=roberto.sassu@huawei.com \
--cc=simo@redhat.com \
--cc=stefanb@linux.ibm.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 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.