From mboxrd@z Thu Jan 1 00:00:00 1970 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 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: 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-Google-Smtp-Source: AGHT+IEdiOBkJ+adeSqv+rNybEPwNkGGa7iFCLcf94f4++BXPp1TK3JUSZqCbU2Yvqne0MvrzB+F7Mt8oGlgCeTEfL8= 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