[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aX9P2Y4AUuetwIPF@fb.com>
Date: Sun, 1 Feb 2026 05:07:38 -0800
From: Daniel Hodges <hodgesd@...a.com>
To: Ignat Korchagin <ignat@...udflare.com>
CC: Eric Biggers <ebiggers@...nel.org>, David Howells <dhowells@...hat.com>,
Lukas Wunner <lukas@...ner.de>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>, <keyrings@...r.kernel.org>,
<linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: pkcs7 - use constant-time digest comparison
On Sun, Feb 01, 2026 at 11:55:26AM +0100, Ignat Korchagin wrote:
> On Sun, Feb 1, 2026 at 5:41 AM Eric Biggers <ebiggers@...nel.org> wrote:
> >
> > On Sat, Jan 31, 2026 at 07:55:03PM -0800, Daniel Hodges wrote:
> > > This creates a timing side-channel that could allow an
> > > attacker to forge valid signatures by measuring verification time
> > > and recovering the expected digest value byte-by-byte.
> >
> > Good luck with that. The memcmp just checks that the CMS object
> > includes the hash of the data as a signed attribute. It's a consistency
> > check of two attacker-controlled values, which happens before the real
> > signature check. You may be confusing it with a MAC comparison.
>
> On top of that the CMS object and the hash inside is "public", so even
> if you have state-of-the-art quantum computer thing you can just take
> the object and forge the signature "offline"
>
> > - Eric
I just went through the code flow again and that makes sense, sorry
about that!
Powered by blists - more mailing lists