From: Eric Biggers <ebiggers@kernel.org>
To: Mimi Zohar <zohar@us.ibm.com>
Cc: "Dan Carpenter" <dan@pereq.eu>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Nicolai Stange" <nicstange@gmail.com>,
"Karthik Bhargavan" <karthik@pereq.eu>,
"Clément Blaudeau" <clement@cryspen.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"Roberto Sassu" <roberto.sassu@huawei.com>,
"Dmitry Kasatkin" <dmitry.kasatkin@gmail.com>
Subject: Re: [PATCH 0/3] lib/digsig: fix some bugs in digsig
Date: Thu, 3 Dec 2026 10:45:28 -0800 [thread overview]
Message-ID: <20261203184528.GD2267@sol> (raw)
In-Reply-To: <dc14dcfbd1a0ff17aabc36593276341fe78e3cf4.camel@us.ibm.com>
On Thu, Dec 03, 2026 at 12:09:49PM +0000, Mimi Zohar wrote:
> On Wed, 2026-12-02 at 22:44 -0800, Eric Biggers wrote:
> > [ +Cc linux-crypto@vger.kernel.org and linux-integrity@vger.kernel.org ]
> >
> > On Thu, Dec 03, 2026 at 09:18:53AM +0300, Dan Carpenter wrote:
> > > On Wed, Dec 02, 2026 at 12:57:16PM -0800, Andrew Morton wrote:
> > > > On Wed, 02 Dec 2026 15:20:27 +0300 Dan Carpenter <dan@pereq.eu> wrote:
> > > >
> > > > > Pereq is doing formal verification work. These are some bugs we found.
> > > > >
> > > > > * Dereferencing an error pointer on the error path
> > > > > * Not implementing the RFC correctly
> > > > > * Allowing garbage bytes after a signature
> > > > >
> > > > > Fixing the last two bugs is just about correctness and they don't
> > > > > actually affect real life.
> > > > >
> > > > > lib/digsig.c | 11 +++++++++++
> > > >
> > > > Thanks.
> > > >
> > > > hp2:/usr/src/mm> scripts/get_maintainer.pl -f lib/digsig.c
> > > > Andrew Morton <akpm@linux-foundation.org> (maintainer:LIBRARY CODE)
> > > > linux-kernel@vger.kernel.org (open list:LIBRARY CODE)
> > > > LIBRARY CODE status: Supported
> > > > hp2:/usr/src/mm>
> > > >
> > > > Someone please change this!!
> > >
> > > Someone needs to summon Greg. Say his name three times. :P
> > >
> > > Realistically, it's probably going to fall to Mimi or maybe we could put
> > > it under crypto?
> > >
> > > regards,
> > > dan carpenter
> >
> > lib/crypto/ is for standalone cryptographic algorithm implementations.
> >
> > lib/digsig.c is a high-level keyring consumer (using the keyrings
> > subsystem, which lib/crypto/ has no dependency on) that implements
> > support for the IMA/EVM-specific obsolete v1 IMA/EVM signature format,
> > hardcodes SHA-1 hashing, and uses a bespoke implementation of RSA PKCS#1
> > v1.5 on top of the MPI library. Only that last part is a cryptographic
> > algorithm implementation (of an obsolete algorithm, of course).
> >
> > I think it should be moved to be alongside its only caller in
> > security/integrity/ and renamed to digsig_v1.c. That would make it be
> > owned by "INTEGRITY MEASUREMENT ARCHITECTURE" in MAINTAINERS. Likewise,
> > include/linux/digsig.h should be a local header in security/integrity/.
> > Documentation/security/digsig.rst should just be deleted, I think.
> >
> > Mimi, Roberto, Dmitry: does that sound good to you?
> >
> > Note: at some point I'd like to fix the kernel's RSA code, in which case
> > digsig_v1.c would have something better to call than the MPI library.
> > But security/integrity/ is still the right place for this file.
> >
>
> Thanks, Dan, Eric.
>
> Eric, that sounds fine. At some point, the original IMA v1 signature format
> should be deprecated and removed. It played an important role at the time, but
> was replaced relatively quickly with sigv2 to support other hash algorithms.
>
> Would you be willing to review Dan's fixes?
>
For the series:
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
- Eric
prev parent reply other threads:[~2026-12-03 18:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 12:20 [PATCH 0/3] lib/digsig: fix some bugs in digsig Dan Carpenter
2026-12-02 12:20 ` [PATCH 1/3] lib/digsig: Fix error pointer dereference in digsig_verify_rsa() Dan Carpenter
2026-12-02 20:57 ` [PATCH 0/3] lib/digsig: fix some bugs in digsig Andrew Morton
2026-12-03 6:18 ` Dan Carpenter
2026-12-03 6:44 ` Eric Biggers
2026-12-03 12:09 ` Mimi Zohar
2026-12-03 13:49 ` Dmitry Kasatkin
2026-12-03 18:45 ` Eric Biggers [this message]
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=20261203184528.GD2267@sol \
--to=ebiggers@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=clement@cryspen.com \
--cc=dan@pereq.eu \
--cc=dmitry.kasatkin@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=karthik@pereq.eu \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicstange@gmail.com \
--cc=roberto.sassu@huawei.com \
--cc=stable@vger.kernel.org \
--cc=zohar@us.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