Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp109396lqc; Thu, 29 Feb 2024 11:42:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXnjh+chum3TJEwjsJkc4jsutg+QyZoopNwFLQU/H2TV6ezMP04AQZRyLgCtsWIbuQhodc23ScF1rZCi+9FSqNmtExw5lwaG1pMbrWCaA== X-Google-Smtp-Source: AGHT+IGfoOft5a0B2hKJub1J/aNS5ExHh0rKah6/0hi+yeTF3Bp8ytnle22EmTsp21nWSL3rcoqV X-Received: by 2002:a17:902:d2d1:b0:1db:f033:9f9b with SMTP id n17-20020a170902d2d100b001dbf0339f9bmr3799678plc.9.1709235775161; Thu, 29 Feb 2024 11:42:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709235775; cv=pass; d=google.com; s=arc-20160816; b=YhlfdZ5SpfgLN1C2r7uFUryygk79jq/Ncf+WwsvWfpdBRx51pVqQSqIuuGjc8wDfkA 60bNZuFbLg7OjWCLd5YAHECCXJZKab+lY3L7oRYbezUvoSfB5pPCW3Lkc6ePvApleW5V GKP0j8hu7mi7pBnOcqMbwoAAhlAbTLiRrLYiqa3pLwls0eM79zqkeFt8kCvMMoF4wz27 mVsEE1A66DYioOQoj5mPRMI7Ll9PEOY3uk7TZjysxaxpRso8acdxF7dOIJTnHboh/geL B9/WcYhN7e4xYrg1lUoRfPoRHVfNUsMSX3wVfyy2nagSCx1cQxeR1MNsMuTQ69nLXZIU ZjOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rRKV1Zm71MNeDgA3/ozecquE2n8FcPbw15GJ6fmvWsE=; fh=nH1cAyRXPXUgF35Ps6N/m5Xx+xoBuRvM69T9ioamd4s=; b=CbtOLbKPqnKV3o7w5OyojziTQ31lEL8RKVzF6ByA5swqbTmiefe/zx/5fZcTMY3Q7K fuAGYOs+i6Gs/4MYMv7oKE8VgD038VbRm/P9AiFudujXdyCW3LDxWmP6xBzJyGObvft1 eCkBQTH+FrE+yAt1g42jAn7YQ7aEYpZBybOkXTmPAKWzJJVmhfE9ntDeDRkEQnK47pcc CZECXORS3K+5SIIRBqZJrEou80Td+yN5FWh/qsA3X9cyweUJ2pf6XTAoTg6WQ/l311GL NWB3Vtnb/hh4JTcYKBkFqJmJ5V0T+HU9gTCQbLl+7gd/akf8HkwYxLjmjGH3zidcM5LQ 7mYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dbp5jW+R; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-87367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z8-20020a170902d54800b001db8cd7492asi2042273plf.86.2024.02.29.11.42.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 11:42:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dbp5jW+R; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-87367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D593728527D for ; Thu, 29 Feb 2024 19:42:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB05013F423; Thu, 29 Feb 2024 19:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dbp5jW+R" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B053BA5F; Thu, 29 Feb 2024 19:42:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709235761; cv=none; b=DKEYePfN2YpmXqwyoR6Ax/H4pWtm7wGUZrPgEj4253ApBwRoVKto62nn963VPRtApLPel1B9nxWJXg/wWkUobYrYlOMbIEmiO5ns17eNSUQXvgkYZ2fUc5wjej9qbsSpyK1TjEDOM7hKxv7d4LArZqx++lMqnnOqN3HDduNq5Yg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709235761; c=relaxed/simple; bh=Vi1OV6mPnbivI3QcfryhhIDSyDsUvv3NuubcSwFHfrE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NPRSMVmsNVorhVdFUunqQ6itnMnwyU+z8vp4gt6dhIHEq0+isCXO6DPZzJDfLHr9JGtiNyqzDGKf2xC6gQBe9V+LPaAIj1P9fsK/BEg8Ma9vmqU9rlHWSWdr+8Z5lDf8JspBu51mb7Uznt1dAZxC6TTEaY7+VkvORYuWB7ZmcJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dbp5jW+R; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 892BBC433C7; Thu, 29 Feb 2024 19:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709235760; bh=Vi1OV6mPnbivI3QcfryhhIDSyDsUvv3NuubcSwFHfrE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dbp5jW+RbWM6tOj49M04q1npx8OYdVRYu90kwphtII1yEQ8sD23lUYszEQOhJ3XS6 kco9VUDO+T7GP7PMq9LqMid3f1dsyrAqf7QtBRZ25hfm9yyfhhccISC5d9APB1NZn3 qOgJH6OmC/7qWfpeCOd4Ui2XTnf5LFu6YVjUXUtwPDztMOVpnXV8NKsrABhDTi/Wfj 7OBjYEJUSp8yQJ1C6jZZqd5fdaz2R8kGCqVSDWS1B7HsAZHAdVGWzGvaV2zuVlD0rJ HwTPoMm3wIiPh+M2EyA93AOYY0mPCqdK3t4cwyr4Gyv4VWY7iP3xmkZaH1P0QHz4h+ 40oN5y8eCz5QA== Date: Thu, 29 Feb 2024 11:42:37 -0800 From: Eric Biggers To: Fan Wu Cc: corbet@lwn.net, zohar@linux.ibm.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, eparis@redhat.com, paul@paul-moore.com, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@lists.linux.dev, audit@vger.kernel.org, linux-kernel@vger.kernel.org, Deven Bowers Subject: Re: [RFC PATCH v13 17/20] ipe: enable support for fs-verity as a trust provider Message-ID: <20240229194237.GA1454@sol.localdomain> References: <1709168102-7677-1-git-send-email-wufan@linux.microsoft.com> <1709168102-7677-18-git-send-email-wufan@linux.microsoft.com> <20240229044625.GA1946@sol.localdomain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Feb 29, 2024 at 10:59:21AM -0800, Fan Wu wrote: > > > > So IPE is interested in whether a file has an fsverity builtin signature, but it > > doesn't care what the signature is or whether it has been checked. What is the > > point? > > > > - Eric > > It does make sure the signature is checked. This hook call can only be > triggered after fsverity_verify_signature() succeed. Therefore, for files > that are marked with the security blob inode_sec->fs_verity_sign as true, > they must successfully pass the fsverity_verify_signature() check. > > Regarding the other question, the current version does not support defining > policies to trust files based on the inner content of their signatures > because the current patch set is already too large. > > We plan to introduce new policy grammars to enable the policy to define > which certificate of the signature can be trusted after this version is > accepted. Ah, I see, you're relying on the fact that fsverity_verify_signature() verifies the signature (if present) even if fs.verity.require_signatures hasn't been set. That does happen to be its behavior, but this isn't clearly documented since there previously wasn't really a use case for the builtin signatures without setting fs.verity.require_signatures. Can you please make sure this behavior is documented properly in Documentation/filesystems/fsverity.rst and in function comments? Otherwise I worry that it could get changed and break your code. - Eric