Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1341132lql; Tue, 12 Mar 2024 14:16:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMo9QZDwYq8hDYUWTkxjDFIicdYuyyT10KJ5PJftDZfMNjAN2sNJ8LPDTY/4Fhr18sEQISTSxfltA48kxCArx/itIYYqIhSr8coKvw8g== X-Google-Smtp-Source: AGHT+IE9oxURYF3A7RWJbcdgkgGZLnD6hE/7QnlFwaD7BYuEKUydLJO3eszEYCW4dNBn40HLdBdf X-Received: by 2002:a2e:9219:0:b0:2d4:2bc5:38f6 with SMTP id k25-20020a2e9219000000b002d42bc538f6mr1069463ljg.35.1710278208315; Tue, 12 Mar 2024 14:16:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710278208; cv=pass; d=google.com; s=arc-20160816; b=ETCmOljdcW/neFdGSNFPLMnLjlgVc29Pp5l/9/0occbSfciTcSeTATZBeDty5XMjxJ RYmScIkR91bhNJH+zfpr9bGcByRQ4E0EuzOcAJNYofMzO8Js5znb8EAGlHx+VR9Nepc9 pPzMoMHI5iUYZC/Cxti8q/Xyir7S5HVk2fD+qLHNpLii2AYHQ30PEimUiIkf60gFDEI5 JCI0lmo1LafntAIMoZJX31DbdxEojI6HTc9XOLBuOIoGzKNgsiRIZ00PlRcO1xwB2PPE wzMq5uvwG4jz4Cc0TWvQcCxJUf6dmTKSbW8Bhoda0Szl885kE6Xt1Z2ZnfQUQvHFtZ5P gQkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=lYJ68qCJj9s6NmpqrgZ2poblEliQVIufa8sFiTqeojI=; fh=Av4YTSQPz9LQbQLe9TKqzUTdFByoH5IQjDbrd0cycXs=; b=SKcP4lATG8R8d11SyCf2C++qKPQDoaxsf+qnW2TJc2eo1TRrndlsLKmiDM+xgnsCCA THEKBL7ZnJJC2vYQEm+GFRuEinl0dSzYCqV6olHNGUj4wckdtvZNgy1G7/7d2sxA854p bQVs+p8zhYggEnkE3uYjGOJEAk6KNo7PtFE1kPFU5ybLp6h5XLz18AP03tEuRUrDeLn0 gH6PLOPjSkiNL7aNkv5FKqiKwFZtdcMkhZXZw98cn81MWw9PhsqHY4kvgE9sU4tuOz4f 5/PtcaGkRRFoKNqOR+f7iVKA/L0/Zj6Djh4L00omJHvlcJSzd839zLUgQwHssPZrdekE FW0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=r6rigTx1; arc=pass (i=1 dkim=pass dkdomain=yahoo.com); spf=pass (google.com: domain of linux-kernel+bounces-100691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100691-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 14-20020a0564021f4e00b0056870562159si1193677edz.590.2024.03.12.14.16.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 14:16:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=r6rigTx1; arc=pass (i=1 dkim=pass dkdomain=yahoo.com); spf=pass (google.com: domain of linux-kernel+bounces-100691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100691-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 89FA71F234D5 for ; Tue, 12 Mar 2024 18:51:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C718142645; Tue, 12 Mar 2024 18:51:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="r6rigTx1" Received: from sonic306-27.consmr.mail.ne1.yahoo.com (sonic306-27.consmr.mail.ne1.yahoo.com [66.163.189.89]) (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 34E2B1419B0 for ; Tue, 12 Mar 2024 18:51:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.163.189.89 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710269488; cv=none; b=JHvajktZ57TMAxIaP35tetQmcdBYS10J5F089FLBPhXYOOoCPKafbLpXRI2s3atNcf68WaAdngxZMpeelQhig8QHM73NV45PCiZWMLF8PHy6hg0PhOikNSmp2WZCFp8FXzdVYNbkMP1XVDw0HNjr6wh26dLnC4DRcycG7o02E6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710269488; c=relaxed/simple; bh=lYJ68qCJj9s6NmpqrgZ2poblEliQVIufa8sFiTqeojI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IxO8F8wrDCPXFGUNKEmCJiB8cBFYPkteWJ6FGFRziNASS/sTkmuES8TrzmITFnX17z5ZOne+nksMm1KnjzYJM/sd7YLKCC36Eh4NkOr1EjXEJUEBkSRvUHrfUuJv9HS2DaqpK5VbqehZypG1k84CXGE8I0xckG2FKOMJn/r4cq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=schaufler-ca.com; spf=none smtp.mailfrom=schaufler-ca.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=r6rigTx1; arc=none smtp.client-ip=66.163.189.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=schaufler-ca.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=schaufler-ca.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1710269485; bh=lYJ68qCJj9s6NmpqrgZ2poblEliQVIufa8sFiTqeojI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=r6rigTx14JPynU5qRTWbh+by/HS9qNFry+a2PuixUw5RPmaPHTwiex8hw7fkbY59as9GeXqIReuTShMsD42FN3NHXgaE+9Rp46pY6FlcRlIROgyCujKDKX4ciWF+c1DINQsf7hmrtgIIkfrXpDjS4GVOsBQEaYAb+r/iAwrrpABlfPZutbh8lYuJ0NY5s2+SVuv3OF+6EN+xNJcDa5vuGLQqzIoH7OFoPv4E8gBxXE7kO2mKqLQHQkArMa2h5bXViAeGJ1GrvxG1iP52sjuKHin++yqUSxKe2f7pzGEsJh1oosp07186m59UXbGjxWV12Cf94ZtSXv1paFrJNPUeeg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1710269485; bh=guznvln6aQ2vnACE+hk5PJrBA1s9s67fzj015pktdNu=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=tByuAvMGTBqoDE5okVLbCCCZnOk7fUFenkPFmR5edu/Zv1Bp4+iB+yHx6SfA+br3Vj+XU3M86TzPUMJ0GQg/gRgRVIJZcBKBmlVAhu9MDB0E2Ft/OAngpKPGlYBL4oFG0AgRPJm7IlBlCaHrotBebzcG/dsD1F0jyHip1EoxGX0fPLEehjV21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xDz2Ldf CvZOtRF3uIopySC6Cvw4xZebEq2fBIkU_arY4CAW.GAZr6faVjQlxJwE28QydMsuH2eYLG67Hyso rRzI0O6q9rM6F.uOFhdU7fkYRm51Sasu._x_Wbf5Glf7aJXCmdqMuOTMhnZkrDz9KsWA7OcxRbHq 1cvPd8EKBGEmAGJg565znA3L1BZhxyz_2q05SukGr1GVGCzghOgt3d5ED_AMCUQ9_jRvWipVPTsq SoJ96JJyftcwQGCkNrURT1OZBDCb9m3oTT52OPXzb4C_PvF2CFc3ZmvXa0YdsRRt1_oE.jg4AnvJ g2J5EAMCubnan9GmOjRtOfj23IlY.EASbKz9AEJN4hQ-- X-Sonic-MF: X-Sonic-ID: 473a33d2-9797-4f38-8d7b-df1ee892c69d Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Tue, 12 Mar 2024 18:51:25 +0000 Received: by hermes--production-gq1-5c57879fdf-hjdnf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7827e58d8a097c72fc3e89eabf3f0a6a; Tue, 12 Mar 2024 18:51:22 +0000 (UTC) Message-ID: <568fae5e-a6d4-4832-a1a1-ac3f4f93d650@schaufler-ca.com> Date: Tue, 12 Mar 2024 11:51:20 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v14 15/19] fsverity: consume builtin signature via LSM hook Content-Language: en-US To: Fan Wu , Eric Biggers 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 , Casey Schaufler 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> <51810153-eb6e-40f7-b5d0-5f72c2f4ee9b@linux.microsoft.com> From: Casey Schaufler In-Reply-To: <51810153-eb6e-40f7-b5d0-5f72c2f4ee9b@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.22129 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo On 3/12/2024 11:14 AM, Fan Wu wrote: > > > On 3/11/2024 8:07 PM, 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 you're >> actually abusing the existing security_inode_setsecurity() LSM hook.  >> Currently >> that hook is called when an xattr is set.  I don't see any precedent for >> overloading it for other purposes.  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 hook may >> be necessary to avoid issues with overloading the existing xattr hook >> like this. >> >> - Eric > > Thanks for the suggestion. I found that using > security_inode_setsecurity() causes issues with SMACK's > inode_setsecurity() hook. I will crate a dedicated new hook like > security_inode_setsig() in the next version. What is the issue you encountered with the Smack hook? > > -Fan >