Received: by 2002:a05:7208:13c3:b0:82:bbfa:f723 with SMTP id r3csp1142656rbe; Tue, 14 May 2024 12:57:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPl+jceuN/kH9ip3TamZD5VYnolH2EbwvEYwcLtTC7xGg6rhhGOJE89NiCrDNa1AF8drtCZSKPDTZz6P18XptD7ZurTbwKNEKdkU6TUQ== X-Google-Smtp-Source: AGHT+IFjUOeJXrByDZgC2vmM6ndbyBn1j63ljNaqBmLrtvMMFLXfUHefByWozzEbs/C/nluewPSO X-Received: by 2002:a17:906:5393:b0:a59:bacc:b07f with SMTP id a640c23a62f3a-a5a2d672f6bmr967626066b.52.1715716637632; Tue, 14 May 2024 12:57:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715716637; cv=pass; d=google.com; s=arc-20160816; b=HSzF5Jp4DUZ8NTv1O3gLf7v2gTJ6u77huaShFuRtzk3hiyTnrjYTiJMUyK/IFOTOX6 TGKyWx8AD9249rRt4wVWGzQKKXQ5v/56e/eT4fqNBye5cBeSHT9H4lPEUyrUZr3QDUcs BpEkLUvbgeA5rUgoijQD1Tf1wnpYLELzfe5TjiwFOm+vOn/HMMveTh5nzX+bqdgMmKjx dNCFrER4b6n8n7W0uEePU4a9ajHB9lRKse+eC45i8ME7jfAkL38BoNo606YCSqesdUPC m1hnmogTqZUr0aWcUQupIdkmKpIz6YFyHxNxN85sEXwax08GYG589GUmX7D+JmqIdocP +nFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=I5DfaKSvWBjSuruH8QpkzwqbDWxyqIe8ntp5STBjhPE=; fh=DvLB3Lx96MCES1UNK1DXQfHjghEFS0pzdeJ4gAYjTRo=; b=EnALsm790WXkZZsI2Z4S2mPAq0BnkmQ11dEVb05Lo0T+swa1+TqEP5zhgmT15nyhxB ZXiE+MgISPRVFHFTZeEbF9hwpXdJkVChx50kk5UPj/w7Eem1YnCREw5ByzG1PmgCBUz7 VXYAwQu73tzj+P7YZjyE80J/5vA1hvrftNTx/zHVtCHSKHiyg/NII2a+q/2eYHRbjcOi XmAKS9Q/L7i52n+d0TMkLXxinYiuM94lsqAceJJAJAjkj6nZKX35ZVO/0vf+kxuyRnIm cgUpYmFMzR27HrICikW3wbAvSNfpyOyvSxxsAm2KcI6DZMiw3ZL3Q+7EJhPAIdC/pPgr F6hw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=BQ5nTcrJ; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-179123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be6afesi650539266b.802.2024.05.14.12.57.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 12:57:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=BQ5nTcrJ; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-179123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2F3F51F22D90 for ; Tue, 14 May 2024 19:57:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13466180A92; Tue, 14 May 2024 19:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="BQ5nTcrJ" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E1E1181331 for ; Tue, 14 May 2024 19:55:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715716516; cv=none; b=CtXK5NS31kVH62+xYDG7FdfLoqP9zNZ05JJzpO4nmvnUogS4hY8mw24HZHtmHLurIAg0HATGa+PLGzTF9a+ZcyfbwgeT/WwWQsbywK6XxFsdTnjBdZGIwAbIBia4RxeDQJGi9KE1e+0v8C+LxfAeGf4kbUNsBM2xRaeP4kwY4/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715716516; c=relaxed/simple; bh=Tn7ggDBZ467fewog7X29iTchxNr3w1imZ5QlMHFp0v0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=j+Cbo2E84k3exYKq4hctmYI2GzPzBC1p++p+k9bIaAWrWnBp75Z+NOibz+6rbYkeyODcd1buLgBwJ26HsRlWWy1tqIpobO3pzcID87btLSB4SdR/Ni1S7h/ocZjrCo5noYFuXyid1ojmwr0VU3lITWlR+nYeNpMhUqSCMHFmQjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=BQ5nTcrJ; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dbed0710c74so5193127276.1 for ; Tue, 14 May 2024 12:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1715716512; x=1716321312; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I5DfaKSvWBjSuruH8QpkzwqbDWxyqIe8ntp5STBjhPE=; b=BQ5nTcrJeiDGmJPbk+0RbPTElKvyqninC22tbUnOXLGS1LGq1NMiBlKd/vEdzgWmX3 J6CyOwcl5ivwV579DFEK3+TPJNedRbX5ta4rufuEGc9PXSFysi/1ahLWwCZ145ht6Uyl Bw6LPtcCw4jhHWxePof5VARvVKrO7Gny5IjBXAEBH3jl2fhWU277pEPsN/aRwtFOao6H alRLOYOxC3Mw4O3SYM24cutTSjj6riCyqehsqMkh76Ix8NCPvVfYnaoGWhA3ar0CMRBO uOblc/Ql1V5KS6OL2dGv81/5AuDDrkYhB4Q5bH42HhK8obCcNSuLZXmuVzWWpy725Av5 SDxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715716512; x=1716321312; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I5DfaKSvWBjSuruH8QpkzwqbDWxyqIe8ntp5STBjhPE=; b=lvcSevrViporIiUFDhwd5cU19iO134tbGKJqWuDOEWgMYS89uuwu1/yfMaiIT64RVb t5fZWgo2MXDI1h00IzKw6R3AsYjcq22iDnYLOUtJIRBofFjK1AhxlT5u3vHPoT0JH/Sa VYUebEiFA6TfLad3v0Ybh0+adGmjCZZnbl5fT3Mr5qpEfLg6lGnXPdxdh3s3bevuxigB sM0kYgCc56kmqpwN+gOe1NusUaELrR3c7R7up65VzlbRgpYfwD/Ps+Yi3nmd/4z5rFnR a9/jOWKlhBIPGQwrgxGetwsvXt95W+F8f6qu4BqPghvNt0nYF0wY9PtEyRPcCgpZXRjQ mA/A== X-Forwarded-Encrypted: i=1; AJvYcCX+HQPQUUZmAA9xGA3vLDHZLX+gWpJx6JYrERfGGuAk2lVO+eLGaDCPFFjoneIDNjHTtqQOSpp+frowlL/ASdJm0JmLE6GqlDDgek9U X-Gm-Message-State: AOJu0YxuRfxvDSXSt/iwYYxk7LBHHQVxYirR6LKrZmZDdaF4ntx4u/lZ rEk/L0EOVrk73sqUje0VNp0KljYIB6ddXqRJGIo39HNVcapSeNxIDtEuC2zW4QyTw+glgQEsrNN c33Up8FntjzWzvdnC0N6R/k2zYPxAg5b5GK33 X-Received: by 2002:a25:ad50:0:b0:de4:619a:fbd with SMTP id 3f1490d57ef6-dee4f2f6cb8mr13359322276.9.1715716512499; Tue, 14 May 2024 12:55:12 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1714775551-22384-1-git-send-email-wufan@linux.microsoft.com> <1714775551-22384-17-git-send-email-wufan@linux.microsoft.com> In-Reply-To: <1714775551-22384-17-git-send-email-wufan@linux.microsoft.com> From: Paul Moore Date: Tue, 14 May 2024 15:55:01 -0400 Message-ID: Subject: Re: [PATCH v18 16/21] fsverity: expose verified fsverity built-in signatures to LSMs To: ebiggers@kernel.org Cc: Fan Wu , 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, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, fsverity@lists.linux.dev, linux-block@vger.kernel.org, dm-devel@lists.linux.dev, audit@vger.kernel.org, linux-kernel@vger.kernel.org, Deven Bowers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 3, 2024 at 6:32=E2=80=AFPM Fan Wu w= rote: > > This patch enhances fsverity's capabilities to support both integrity and > authenticity protection by introducing the exposure of built-in > signatures through a new LSM hook. This functionality allows LSMs, > e.g. IPE, to enforce policies based on the authenticity and integrity of > files, specifically focusing on built-in fsverity signatures. It enables > a policy enforcement layer within LSMs for fsverity, offering granular > control over the usage of authenticity claims. For instance, a policy > could be established to permit the execution of all files with verified > built-in fsverity signatures while restricting kernel module loading > from specified fsverity files via fsverity digests. > > The introduction of a security_inode_setintegrity() hook call within > fsverity's workflow ensures that the verified built-in signature of a fil= e > is exposed to LSMs. This enables LSMs to recognize and label fsverity fil= es > that contain a verified built-in fsverity signature. This hook is invoked > subsequent to the fsverity_verify_signature() process, guaranteeing the > signature's verification against fsverity's keyring. This mechanism is > crucial for maintaining system security, as it operates in kernel space, > effectively thwarting attempts by malicious binaries to bypass user space > stack interactions. > > The second to last commit in this patch set will add a link to the IPE > documentation in fsverity.rst. > > Signed-off-by: Deven Bowers > Signed-off-by: Fan Wu Eric, are you okay with the fs-verity patches in v18? If so, it would be nice to get your ACK on this patch at the very least. While it looks like there may be a need for an additional respin to address some new/different feedback from the device-mapper folks, that shouldn't affect the fs-verity portions of the patchset. --=20 paul-moore.com