Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1050411lql; Tue, 12 Mar 2024 06:12:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUltXtt7IRCSBvsSwqx0h83EZMJRLjaOJhc8rbhVNq/vQYLJ1YsMJmmxEZqWWTfrx1yAR06A7a20zpdcqN7R3jgr0Mlonz5yepdtzGbkQ== X-Google-Smtp-Source: AGHT+IEAhFd+EKK2r+CopxR10C3W3VmXfunUPueSY05ZFcH/4/qAAqbtT6a0AhW7OpVLAOzllcmC X-Received: by 2002:ac8:5c92:0:b0:42e:f55f:39da with SMTP id r18-20020ac85c92000000b0042ef55f39damr17331133qta.0.1710249149809; Tue, 12 Mar 2024 06:12:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710249149; cv=pass; d=google.com; s=arc-20160816; b=mC8psOp5xw23W7hkZtL0ZegBzTNWeHl4MLSjctlOvTZuf5M7DmHpxcloGXadC2I502 dEzOzfRV3tmPowezVwVUSNqLulNN6F0A4yvw7/OuNgh14E3ZCvTv5nYqVF3Qn5FbhK1W RhQO5bFfWWJUt2QxMe8IKlFcghcNotYINJc8/uIZpEfL9MdqRaRnlurKmMvaip8p3f/2 OEIbYMQf9fP3fxz2ORtdS52AEPrS7srzp0vtxpbfnKiD5V46VqtzJjgEU7JOaR0Y9SB9 kHV0ECWSS1R8stY0d/g0PatxFwkWgC0kBCugAiVW0Z3VHLCI59v6Flns2ielHHc0jSZr IVxA== 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=xGm6l1YRLh5BPGXSeJhTa5Xkczn4uT6yuT0rED+ytkk=; fh=lzKLYTd6VmNMavm7kmxLhtpT+mIQAHDKu2t9Qb0Nw6o=; b=VmXrmDZuhs+vKA/4Rzdm9YsYCBOF9r61nEXwHh420H+nMs9nNmk/HNEg0OufluDjdn FkGQJKQBernDKbMgdkuZMnh49X89xgnItUTBOyn9bRG1QnhHK4pKb7ZanPD2EEUzIEfL z67qehGZdCRORiU7TFDBEQ+X30zG54cbpvQrOcnnYtyFylAv+PHgd7LhHtZVJ/rPnMwl 3u7zEog7aSrtUjzSesBACAzY8Lje37ApB1xeR8JPVR0XwnBH3dJlcaVwUINaAlb4ozt/ bfBdJy+//m/zKs+Ccppdwmmp2PxDvlgifsmRM3+AU71vGagLKDP7i+97JWbWNuZyFcJf wJ2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=AeF5oxQS; 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-100276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100276-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 ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d10-20020ac85d8a000000b0042f4de7466csi2880536qtx.210.2024.03.12.06.12.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 06:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=AeF5oxQS; 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-100276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100276-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 89F081C21E85 for ; Tue, 12 Mar 2024 13:12:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEEAB58AC4; Tue, 12 Mar 2024 13:12:19 +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="AeF5oxQS" Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (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 26AC96997E for ; Tue, 12 Mar 2024 13:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710249139; cv=none; b=ggFh6Ds/XT/3n2qs+cf/M0Vc8UAhDN4b24TANbaYHGdQMr0tBEiqnNRa91EPmRhr1xACiGIGWvXdzhv+Ed9NLpu2C/ASwnV+7MD/PnYA82AoFoj9cxyEEA/dIJGOlJXrweuorgjXPGxeMulCmg/Ca7ECiZsVt80nadMyvRt6pKo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710249139; c=relaxed/simple; bh=5rt+RWbBJPhAUl1uqDwh5UWlve/OPz4PeCvfGqj3MHQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=dYgnm0lD2Zf7jhg+FAvyTii+0yUXQ1pnYPVuKW7aLJX7/vLkfngdyLpRoQZZkSRylcygo1GBEohooamkBvi1LFTs/EPUhzITdxEATlII0D+BcsSyJXyzDAlw5KHntOjYPZN2YUWf950xq4LLezs4zCOxLVpkTHtD8CNPqTaRUdA= 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=AeF5oxQS; arc=none smtp.client-ip=209.85.128.170 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-yw1-f170.google.com with SMTP id 00721157ae682-609eb87a847so42020457b3.0 for ; Tue, 12 Mar 2024 06:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1710249136; x=1710853936; 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=xGm6l1YRLh5BPGXSeJhTa5Xkczn4uT6yuT0rED+ytkk=; b=AeF5oxQSugPKh8jPGo1deH2heQlPo67Gx8uPfkXw+A6XRCMxKrmhop4RTi2Raye9w5 td3/8L7cAv6COx2n55EwL5JReK1i4P5PPiYypoSIGkwLVHIPPS/nIssVhO6EvVoiSdwa 25PWyN9KMeoyTR/gJFW6FP+77dd1uhGAFDEy7I0P298m/ZrujwVNmzfBJ57RnEVJRnz7 hFIHzsvn0BzaDpDVS99DEsWFQFKYhVbuQt8C8bZjIr3opLAh5ipZEgkQMXlkanYGp1ue yhcJEtkhHMAz7ALFS6U3xG0xIZj2H6Bi1chBbMLE5wbZkq+AccKzNCXCc5KD/mfWZoRg cqCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710249136; x=1710853936; 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=xGm6l1YRLh5BPGXSeJhTa5Xkczn4uT6yuT0rED+ytkk=; b=vg01xDQzeXtMSg8QlI83xsY9K54BtIykZ9RgBlz3yQTuUXFQ1CW/0pwdlUsnZSHgG1 TH23OevS/9MRboRhLxJik8Hg94T3MsrBfYv7WDd4yyEUyyUiJoszNt5v2h1tICWUykEi DTl+KzkYUQr9qITuoo14q/L27LpHbKy2U8Uzsxz8zcCKYVM7192Ct07SH5KGEOzZefcp 3lanzOtErAtQ1nEkSE8cpN48h9NUX1pM3qrZvykGQcKDrXT5yB9awn5fOAWm5Bvu+SJD KGeqUwxTPUX0xFEqNO+J4bF8AddA+Vw/GnpSO6yfnyYSEL1XLsR3Zh/qHf/NAsbO4nV3 d4Ug== X-Forwarded-Encrypted: i=1; AJvYcCUkAQGVF2JCsyeLaToY+KpEBcGmVEviUkM19E1ZL/8+Ht+95Cd0DhZfOCXMwSEzOFlS7GKJS3jOrxPHc+4XZZEphwZRyxRSuiq6knSq X-Gm-Message-State: AOJu0YxW4K3drH6y05vkmXoDz1ntbS6bPJQlOGyM/6GYvgHJX1/LmRyM a6L+3+bP9PAmMlmINygvyLGRtsmwtipU5MIhJovaEbdOcdoes9pk7vsScaPTMoElNR0pjT37W6L oka+kO7mTIibr4pKuE2OzltnFX8uHpQw0RVKW X-Received: by 2002:a05:6902:2841:b0:dcd:b806:7446 with SMTP id ee1-20020a056902284100b00dcdb8067446mr6722695ybb.1.1710249136161; Tue, 12 Mar 2024 06:12:16 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1709768084-22539-1-git-send-email-wufan@linux.microsoft.com> <1709768084-22539-16-git-send-email-wufan@linux.microsoft.com> <20240312025712.GE1182@sol.localdomain> <20240312030712.GF1182@sol.localdomain> In-Reply-To: <20240312030712.GF1182@sol.localdomain> From: Paul Moore Date: Tue, 12 Mar 2024 09:12:05 -0400 Message-ID: Subject: Re: [RFC PATCH v14 15/19] fsverity: consume builtin signature via LSM hook To: Eric Biggers 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, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2024 at 11:07=E2=80=AFPM Eric Biggers = wrote: > On Mon, Mar 11, 2024 at 07:57:12PM -0700, Eric Biggers wrote: > > > > As I've said before, this commit message needs some work. It currently= doesn't > > say anything about what the patch actually does. > > > > BTW, please make sure you're Cc'ing the fsverity mailing list > > (fsverity@lists.linux.dev), not fscrypt (linux-fscrypt@vger.kernel.org)= . > > Also, I thought this patch was using a new LSM hook, but I now see that y= ou're > actually abusing the existing security_inode_setsecurity() LSM hook. Cur= rently > that hook is called when an xattr is set. I don't see any precedent for > overloading it for other purposes. I'm not really bothered by this, and if it proves to be a problem in the future we can swap it for a new hook; we don't include the LSM in-kernel API in any stable API guarantees. > This seems problematic, as it means that a > request to set an xattr with the name you chose ("fsverity.builtin-sig") = will be > interpreted by LSMs as the fsverity builtin signature. A dedicated LSM h= ook may > be necessary to avoid issues with overloading the existing xattr hook lik= e this. Would you be more comfortable if the name was in an IPE related space, for example something like "ipe.fsverity-sig"? --=20 paul-moore.com