Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp713815pxb; Fri, 28 Jan 2022 08:28:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/qJhNfHIM+Ip6GljRdPW/0ahmme4cuRe8r2wMbJv7FusdfQS6czd5+eMxGBVnbBzw7TSS X-Received: by 2002:a17:907:3d01:: with SMTP id gm1mr7381467ejc.749.1643387299977; Fri, 28 Jan 2022 08:28:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643387299; cv=none; d=google.com; s=arc-20160816; b=VyLiH4oX1CpEPdUXROCYdzQ1gpQqVAtXRFxlG2U5Ehzx+Az3MqbVpl7rim0kQp86cP LLX/WKzuUP+Wtlbn7qIjKk6s8uyPpbErccSosnwodPX/xu0+HEBJk0TAp1W5ZzeHN1Fl Ug0rgokgIae2rMy+3GZVp7S3upK80HJOlVYFzfrwJv6IJj0EeNhTon80QgJdcjeebpts glM/0IbCrJ/C9hlVOndEfwi32S+1xQU97TeSIOFcbJYDie9CiKDUIEWrlXK94eyAzGu6 xJiAWF1PvESsl+zMIufR8FpPOuJSnvbEToVmGXkv/cu2mf8Bt/ATgEHyCHWoQr2AWsl0 CzPA== 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=w5cdL7wMo4qI2p9N4AJ5nTmkFrNBcyGskXwpKBSK2n4=; b=dpuEeaIC9WuI2SQliBB+24unl3isc3OvWME4V7rwy8JFCdh3mw87chNU5htGMb3H31 Sz2Y2EzrSFjn2k7HBa6jzVRnFnTRnyWEVtZ1bg6lFM40JWzZPWJ2cWLPmxHtBnOEvdPU Syz5f0sd2OnykPvCf4WfgFS7n4mS0rdixil3aJyxBq0HNYcyDb6YnyvXay4NQcaXDJmK I2oq7XXKFqTR/ONZYexXEBkvVFEH7JEL1nYvS1UZLxqEqJE88DkjjGC8QofET+baM073 e23Tqn8XesAl79cGlLa5vAJ/fKyhtRaiDrwh6gXeabpVJK6MpCGBB0LDbAlLp1jUbVuV 5AJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kDW9jvfe; 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 c15si3939989ede.581.2022.01.28.08.27.54; Fri, 28 Jan 2022 08:28: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=kDW9jvfe; 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 S239662AbiA0TfQ (ORCPT + 99 others); Thu, 27 Jan 2022 14:35:16 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:34070 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbiA0TfP (ORCPT ); Thu, 27 Jan 2022 14:35:15 -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 323BE61DE7; Thu, 27 Jan 2022 19:35:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6163DC340E4; Thu, 27 Jan 2022 19:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643312114; bh=xjDuYL44PRCV60j88JUn8U44NjVGqHmowB7jXW8PlMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kDW9jvfe+ZIWLeUMcHMbmxdnXkNwekVDfxS9Gr0DxQ6wXjSlKJW7sjpxdHC6OJt3q neuKfJiXNSECbbY/rnCUQtwXWcewcrWs73g3d26OiVEiVeUl50e2vrT7I728SfQHJm 0smyF1GeLHct7C/yBKONgSL2Kn+hHLWiQRhLz7YJVkxZGv0fCFlwv85L/3qCfPk1nl cyrSLUs9MaGNwmMfCJxVcXFHYnTFHa88pc0982KDz4YUt6ZYBdAiAMyvWmgMd6ACcK JzAwkOuhaJy9DA4mu5Jj1huUxgeZckEMTC4m5n7LvEdFlslZ3Viblsu1WIH7tcy1gu VjmFrf7Yoka6w== Date: Thu, 27 Jan 2022 11:35:12 -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: <20220127184614.2837938-1-roberto.sassu@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. - Eric