From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796323530; b=5Vj+jNfuCpDKd7hphLR6xjKpjqJXli+uW8EYPVdRPiM8yDqmG+2Ph1kw1LJHrCmwQmOf jQnalkQN+8dAPzkWS+2v//l6ICOKCXEovaCmxFC8BHrr1ol6kwqrw35yJTyl4FDcTdYW9 ohparZZ62CpYaz7pOB81pfMT6XdJ4C59gI3mKfzuMH4wacdehaiKj4Qk8VWyxR4BU0Oys 0CXDR4IsCGnyhWh0+CCB7+IpDtSWUxLSGafK4ILXZ4vf8D2M6bKRciyT63JG96+hVrqon VSxU9gs9nOgRDTY1OWc66q5MMKWLziC+ITXCzXLpIzFrRSeWgSd6vqh5Q0qJHkYG89A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796323530; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=WDtP2eJDic29vc+z05sBOgFcRdd72GY9G0bfFKa2uhg=; b=VncFU6CY/1Aowp/V/khYQPVYg7DKj3ox4gmHdIaHMSEjd01pg/gMCQwakaihHNQcWof7 fXjL1tj6TjBNZe1QE+X/eC3Gr1F6otAFU4wWSMvH7IUNx9ciER0KOoLQZ7fBrUH2B8Fq2 JpJDaeWXgGnu4SYtZmKU7MJ/my79JLRdex/R+eJpo6xyZN3BOModnPA4R5BqK5fTQTRKQ DI8uzrSek/RoIunLM79aGcq7C8Dhy0GGqcl3sDgvqUxK62kPP7oXb023xtymRB+0qLZGR dTpv6QMOMury7h1mBWQD+/kyuC3SxhBIjOnFcGy8v0L3kUw8uFjAwRQHecAL3oMBoAw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WIerTD32; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF2BD606A33B; Thu, 3 Dec 2026 18:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WIerTD32 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A22A1F000C1; Thu, 3 Dec 2026 18:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796323530; bh=WDtP2eJDic29vc+z05sBOgFcRdd72GY9G0bfFKa2uhg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=WIerTD32qo4+bvf5w9CRSyuFkhuIQCxw1HSeBeErq/ABvW2Scpo0WeQDmgby4lmm2 tiGRzUveAZX/f9PXy3yXiayDBe4xq0iG60NnRjCpKbqz3XRvC9VHVGDu5y+uRq3A32 ijbMVnA2JyqPkZf6tzCV5W24Ha0HY5XkXn0Xs/Ex8618aThm1rq+GybYA/CiQtx/C+ L7VsZxhlyOwjgQfwgwf/mqqlRX1OGJwlAf+g5Gt3A3wq2CDwqvuVTUdRClnanR0xqp JeOvx+LM5uCYSGv8wsgj++qhuChG4jeFOM9mc6D8UMunzdOR3c/eBgnMOSweixskeU XPlLILEyJJglw== Date: Thu, 3 Dec 2026 10:45:28 -0800 From: Eric Biggers To: Mimi Zohar Cc: Dan Carpenter , Andrew Morton , Herbert Xu , Nicolai Stange , Karthik Bhargavan , =?iso-8859-1?Q?Cl=E9ment?= Blaudeau , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "linux-integrity@vger.kernel.org" , Roberto Sassu , Dmitry Kasatkin Subject: Re: [PATCH 0/3] lib/digsig: fix some bugs in digsig Message-ID: <20261203184528.GD2267@sol> References: <20261202-digsig_send-v1-0-2797f094dac3@pereq.eu> <20261202125716.6d3b02ad55f627a480550617@linux-foundation.org> <20261203064437.GA69004@sol> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 (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 - Eric