Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp723251pxb; Fri, 28 Jan 2022 08:38:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJws7naB4rj0rTIHV4cGtGFaJ7qbJuPvgiO3vQxTPrhCZe494y/5W0aBU9RSZcy2m8kXFKJK X-Received: by 2002:aa7:dbcc:: with SMTP id v12mr8969814edt.263.1643387899418; Fri, 28 Jan 2022 08:38:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643387899; cv=none; d=google.com; s=arc-20160816; b=H1hUOikbVHThpTNyqGoxEC3Hu6O7mFSTUtV7dNXAbBrAS1bQjWQUN+dv6jpVn4H8Ob CmlE2tWESSVmWXSR0tKgPOqKhBaLZk8foL4YOtdFiMw/1sVMJBi0OiGe9p8MmLJsNDjp 4tXGL3RPx9EFE0HVmp9jwU3gxzwUdprPsYSegsViOoQFaDUVn+JC8DPtVT/64mIgrblU 3ZlFRa0NAD+26QaffrKjrQJwqhTA79LA3Zq4f9WlEZiNbaWAcljQhqOsH4PL02wmq5vk nhXgwIHNxLBmvZ5AYWL2ke/d3Uhu3Vv1s0ICy1412WvZSosNzlmJgjX5ScmcQOSlbVdM WDbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vz6JXleZ1iB7QLuRsxBJqq6cBxbpDIbTh//dbh9VCHk=; b=tAQatudMIy3YVH5jLxZPvMpmhOtlXaDYyT8ka9c4irlwpbo8uw0zH+XEcx+wnf7gcL 7zzfxIHdHfX5NdaKBjaNJZEXOKrInLDmHRbk70aVjd09fackfTfGfZPHPFSwkdTwmSsh mxYIpPrrVlcq+cdqb5/HXklxKFsGM5XAU7Q+3vihNVIFe/Vl+xlaZJ4wlhvZXIx4NpqG xOGqZZCqUPw3nhsdnPKcLdSs35QCb59CcgXYPkhvJhLho9+Qt4ur0ZUXPPXhcXs1Omcz TXINt3TQsiIO+PQRa6nLh+yctbjcFpjDEiDD8rw55xkjPfU0TCS4LiZFA1S3bLGyRrtx fm5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mbfVmo2u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si3145537edw.316.2022.01.28.08.37.52; Fri, 28 Jan 2022 08:38:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mbfVmo2u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245631AbiA0Tjm (ORCPT + 99 others); Thu, 27 Jan 2022 14:39:42 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:35642 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240050AbiA0Tjl (ORCPT ); Thu, 27 Jan 2022 14:39:41 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1B1B561DEA; Thu, 27 Jan 2022 19:39:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B52EC340E4; Thu, 27 Jan 2022 19:39:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643312380; bh=owz65Zoh9kePy3ZlX07GkhDAStAtpMEoESAaQC2QOkI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mbfVmo2uqo+8GEh0l5KWQwAIV2xmvPtlCTVlp8ccJt8YTEZQcI/WoEKvZVePzpgbq x92AWWjGEfEZ6wTefiKgujv8nQ9eM6pFEhOJWJ2Os58tO7UYH6EEBzYQmHGWHeggTt PLCEVTsp3l+AqG++CrcNAr+N6ml8NMZq+O0W0Z6uZn3xGFvvDTKiOIf6k9Bns64jmu W9w0/AB4fThsGCU6iQGjTxBjwBedFu9YT4ab0Hjcdgot+wRAFeTiqONtHDnHXZ3t2z RtmZS0TvtETw9nBCYTPlZcHHleGGs31cyplLrh7ZJOROF1YLR1nu1UdejuMHYPxGOB UaeP+PRVLpJsQ== Date: Thu, 27 Jan 2022 11:39:38 -0800 From: Eric Biggers To: Roberto Sassu Cc: linux-integrity@vger.kernel.org, zohar@linux.ibm.com, stefanb@linux.ibm.com, linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH v3a 00/11] ima: support fs-verity digests and signatures (alternative) Message-ID: References: <20220127184614.2837938-1-roberto.sassu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 11:35:12AM -0800, Eric Biggers wrote: > On Thu, Jan 27, 2022 at 07:46:09PM +0100, Roberto Sassu wrote: > > I wanted to propose a different approach for handling fsverity digests and > > signatures, compared to: > > > > https://lore.kernel.org/linux-integrity/20220126000658.138345-1-zohar@linux.ibm.com/ > > > > In the original proposal, a new signature version has been introduced (v3) > > to allow the possibility of signing the digest of a more flexible data > > structure, ima_file_id, which could also include the fsverity file digest. > > > > While the new signature type would be sufficient to handle fsverity file > > digests, the problem is that its format would not be compatible with the > > signature format supported by the built-in verification module in fsverity. > > The rpm package manager already has an extension to include fsverity > > signatures, with the existing format, in the RPM header. > > > > Given that the fsverity signature is in the PKCS#7 format, IMA has already > > the capability of handling it with the existing code, more specifically the > > modsig code. It would be sufficient to provide to modsig the correct data > > to avoid introducing a new signature format. > > I think it would be best to get people moved off of the fs-verity built-in > signatures, rather than further extend the use of it. PKCS#7 is a pretty > terrible signature format. The IMA one is better, though it's unfortunate that > IMA still relies on X.509 for keys. Note, the only reason that support for fs-verity built-in signatures was added to RPM is that people didn't want to use IMA: https://lore.kernel.org/linux-fscrypt/b49b4367-51e7-f62a-6209-b46a6880824b@gmail.com If people are going to use IMA anyway, then there would be no point. - Eric