* Re: [PATCH 0/3] lib/digsig: fix some bugs in digsig
2026-12-03 12:09 ` Mimi Zohar
@ 2026-12-03 13:49 ` Dmitry Kasatkin
2026-12-03 18:45 ` Eric Biggers
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Kasatkin @ 2026-12-03 13:49 UTC (permalink / raw)
To: Mimi Zohar
Cc: Eric Biggers, Dan Carpenter, Andrew Morton, Herbert Xu,
Nicolai Stange, Karthik Bhargavan, Clément Blaudeau,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org,
Roberto Sassu
On Thu, 3 Dec 2026 at 14:09, Mimi Zohar <zohar@us.ibm.com> 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?
> >
Hi,
Sounds like a good plan to remove it...
- Dmitry
> > 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?
>
> Mimi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/3] lib/digsig: fix some bugs in digsig
2026-12-03 12:09 ` Mimi Zohar
2026-12-03 13:49 ` Dmitry Kasatkin
@ 2026-12-03 18:45 ` Eric Biggers
1 sibling, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2026-12-03 18:45 UTC (permalink / raw)
To: Mimi Zohar
Cc: Dan Carpenter, Andrew Morton, Herbert Xu, Nicolai Stange,
Karthik Bhargavan, Clément Blaudeau,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org,
Roberto Sassu, Dmitry Kasatkin
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
^ permalink raw reply [flat|nested] 4+ messages in thread