Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp19547rdb; Wed, 7 Feb 2024 19:22:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEB3JB9MNLNCRrhDTU777vstm+UT87EdKMHcO9s987gwkCbRqq7FtNfHsJX8E80En8GxUP X-Received: by 2002:a50:9ec3:0:b0:561:b5f:2321 with SMTP id a61-20020a509ec3000000b005610b5f2321mr324586edf.14.1707362553523; Wed, 07 Feb 2024 19:22:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707362553; cv=pass; d=google.com; s=arc-20160816; b=mPigKvRunbU8/w5FtiNQEuIun7QwbCwbP6m5Pzr9FN5uQrGlJLXqCPNv1hnW8/bQ7I GMuSuUzckAV2bv3jDSO0s46zfn+P3XXhaSoRSXhrGE5iKDabBEBxSeyWDckXZHBg5AU4 a5vEfzBknrZz0RPAq4+4vA7KoBS8Ke66RUpTU61lUzr3vYlnrEhz4EFMWPY7JzffDevr tYIQBDC2S9QbTevFvQRpwiIevgXQIiKN+KRg1aH40c6xb7PhkSXtACDFDRphk+04ZNFe 32vdUj4IFfnp/9Ukr2sqC7+UsNhOBQq14mUT0KE4tf6kbuyN7EO+YtLKUjtUg5IkfjJB bm1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=UIu0ZaUnnX6YtAPfQYEsJ1lwfXBxkEp2fAdgZyQneCI=; fh=RCnoE0770LWR9bGG6IWXt4la8vm9Qoedwv7D8DNIDac=; b=uAIcwntbRhdfqdPsm0YHEWThz7yXoM6zMNCf0xuD/tO6qb7Cw2lapzrvK/UgvsH2gd MJheQnSYJbu7ScZa5HrHTIHE0gJe5wmScfGPcAMfR7S9G7CeLaH/m8r2gMtFBih78fW0 GEGT9eDxYjC92dJYOtG2U1lYiNmO3Eb5nW9I9/yUuuCkgZ85PdCflwM+85yllBsPKuc2 VjFsaNbF5crkXzsqDJfE+LECwYApWKTX3Db5KL4R6gSeYXH/eX2VufVQKj2cxMetUrZa yee87VojoealIc+nTL0IKnRFOJwjDfFe+3FtMhPn+f5Bu469KwvtJ4b7OswNGFJAYvD9 2wuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=DCrtUz4s; 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-nfs+bounces-1844-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1844-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com X-Forwarded-Encrypted: i=2; AJvYcCWMu/B5LpkBe5J/A0mwkORMcYzdfnDuZFhd50snqlXPbOKAm/eJSyYe52q7rJVZURT5iTcHKGOtvKsBmd4gp6MTZERBQ/hYHobfMQ1iiQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c20-20020aa7c994000000b00560be9552e6si430921edt.107.2024.02.07.19.22.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:22:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1844-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=DCrtUz4s; 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-nfs+bounces-1844-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1844-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 38BE81F2146F for ; Thu, 8 Feb 2024 03:22:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA54636AF2; Thu, 8 Feb 2024 03:18:51 +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="DCrtUz4s" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 6C0582C850 for ; Thu, 8 Feb 2024 03:18:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707362331; cv=none; b=kvFeoAMIoJdWH+L35+rB+Dzf5CQlUAUkEuX/CtbE4+5kNi55II06qZlnGH/Hg1qizHl/Z9xLj1XifeSG8LRc0ZGJ3BQcguEbFQHNb2epa/jxGFTScdohghHUI/KVuPHM/l0McKfN2jYuxkvV9AHOJHVMyp720XLNxRdc/1aqWPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707362331; c=relaxed/simple; bh=wNqqnpiWihipN1dNDa3R3CueTKA9HqfAdngEnTXkecM=; h=Date:Message-ID:MIME-Version:Content-Type:Content-Disposition: From:To:Cc:Subject:References:In-Reply-To; b=hAHoc1C8zqR00JzrH1gtwuknlUz4sCkcX5TKK5Y7jnQ87Au6n0eqQAP+Nxfam9liJYjZUogOEqcIHbRVoiL3l2A2paHiu2JUQmi79vODtsEthSLdEdgmv2NFjpeEWZKZo/m0FdhS5rVK0+R9qR5rs5vzcZJrTwlxFtGF2AQmY28= 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=DCrtUz4s; arc=none smtp.client-ip=209.85.160.171 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-qt1-f171.google.com with SMTP id d75a77b69052e-42aadddeaf8so10076771cf.3 for ; Wed, 07 Feb 2024 19:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1707362326; x=1707967126; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=UIu0ZaUnnX6YtAPfQYEsJ1lwfXBxkEp2fAdgZyQneCI=; b=DCrtUz4sRefaAumqYTbv+CMqt2xVHoEmbvcAObYHOPEQP1aVGFzR80DuKz2kiY7cLE ZsNutkdA3avqS81bMmfhAy/9YVbJGAkUwBTVfzxPc1rsvIxYehb9Ilcx5uSKYirS910J M9OwiqX0mbwNDzYVGOrTf6/VTlhtLSzAmNbijGDyxO5aHB3XtkVPXPO0q+BysZ4q569Z ym+3XbuYT9MYBhuqH4nkFL/AOxh2ZDNCJLrJAPcwVHbqollckcQ4bN5QbcuynIWy3vYD jV/Btcq0nFyvDc3X944wzpptXljiJykGnXda9HN+mD+iFAbP1LkaOW5t7xnZJsnfy8wn RB/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707362326; x=1707967126; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UIu0ZaUnnX6YtAPfQYEsJ1lwfXBxkEp2fAdgZyQneCI=; b=E/fD/aiHebi9K0fABBjaBY12MEYk+9xWGVyI0KZV9VFvOTIdroHCmvwjEnsSst5sOv qtrwa8X4gTfrfRUIJIT7HKn3XvFUd5oPOYG7rdZnvDOlxCL/psuv+ZejWDRKz9U2PfcR ND+w9pa4VjCF5VaOa8fqZ20XBR1UfXFHqF8UE1MBG5ZD5d15bpn2+mfQqH3Og9npXQEs TYBscd/4WTXm/JPyeNMSulA09bEakahqWGVfOCob9Uc80QgldmL5ElvnvYQ7HWpzKucL fiBvRT413Zzh5XNaj8ssI6X4j47kFl/0hEBGb7QXVaWWv6guMyLAss3sRcLztXjWt6E8 hmcA== X-Gm-Message-State: AOJu0YwuQWp5JuscgCq89Ak7EWYtfWOj+J4e9Ur21PgGXzDPgfizqGq3 PLgRMgoxsmM9ePTTKHimnN3tD6Rg4AHynJ8sCNWeO7rRZAdrs9z2eMDUPeB0Aw== X-Received: by 2002:a05:6214:248b:b0:68c:a9fb:9a35 with SMTP id gi11-20020a056214248b00b0068ca9fb9a35mr8514998qvb.25.1707362326422; Wed, 07 Feb 2024 19:18:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW3vLP2DzPsxe5CPp/nuqmlQjrzXMqjvyd0PZR6b0/87kWafj0l/GZArG+OpR7Oa8FXH6YnzrM4U+8Z1Lj+cLFjyGJmyXnwCIoIMZWGiPhFBLhsLH74dJznKwOC5yQYB+F7orvR55G1+TDtxFNzGQaHDbsIo7dmXQmZK1Gw1eCHRSYWGnnipAIzZtOr+zTsOTYR8p6a2+YtDmyZJawq5E71HRpdyPUWb7l0Titq+oo46PU7Khr1m08pldHJCndsHFKnxmLJ45vKnQCbFJTnvu+mU+nY/SD3Vv+Zccnd0Ka79+wxFHcH9dGJCVkNzIqGSGKN1bBRjDEAyHuWgmMEEvNgUr8eZH1Wngxw+h1BjNLYHTc6QRQIXX507/GoQgJX2CwdQ9Spqzc1sSy/RfA9Xp2SPlruVNi2q8HB9gSfUZS8ybxKGVAB7Pu5yNczuq+uCxvWv/z5mmPfg7zES0Y/HgfAn1fFwMkktPtM5CPgImgN+GLGuMk1laQpTvx6wsGBGt3IHQ8Xlr9deukycQ3ov+60JesZvSm7Mwtut5bTKbd+hXq6FjNZVny/N7SJa34ejx6L+ixOUSLWaulTJORCB9bAYhnSrMwb1ettNMz5B4xc8p/q7medOsz3Wsit6BImZ/cet7p9n2H0PhY6janIFrbTlwKFrIQtCftnqdaGq0sSD1JsuNSJtvsvSnptuXIpxCjIO2keDyftFImnShL6NdeMLH2n/JDLjqvY+tnPUcXcREBfI7XUMOxnzlQdXvlvi3ycwbUbk2/TdspqWq8BqPtxnndqt4f+i8ePuoJh8xNfDyrmwftSaSdK6oawf9UC6A4BQhrWHxO1KpNP8ntts9cfSriKgG9SPt0i3Xxc+J0HZbdDtgpxV0OqckzhVo+P++pu7k0eqEcQkstxTEoIzPvFG+RZ8VHiUCi6yIJKHqPYIgiV64kt Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id lx16-20020a0562145f1000b0068c510634d1sm1174533qvb.108.2024.02.07.19.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:18:45 -0800 (PST) Date: Wed, 07 Feb 2024 22:18:45 -0500 Message-ID: <79855e97499b7b03a410a5e47588b463@paul-moore.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit From: Paul Moore To: Roberto Sassu , viro@zeniv.linux.org.uk, brauner@kernel.org, chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com, jmorris@namei.org, serge@hallyn.com, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, eric.snowberg@oracle.com, dhowells@redhat.com, jarkko@kernel.org, stephen.smalley.work@gmail.com, eparis@parisplace.org, casey@schaufler-ca.com, shuah@kernel.org, mic@digikod.net Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, selinux@vger.kernel.org, linux-kselftest@vger.kernel.org, Roberto Sassu Subject: Re: [PATCH v9 14/25] security: Introduce path_post_mknod hook References: <20240115181809.885385-15-roberto.sassu@huaweicloud.com> In-Reply-To: <20240115181809.885385-15-roberto.sassu@huaweicloud.com> On Jan 15, 2024 Roberto Sassu wrote: > > In preparation for moving IMA and EVM to the LSM infrastructure, introduce > the path_post_mknod hook. > > IMA-appraisal requires all existing files in policy to have a file > hash/signature stored in security.ima. An exception is made for empty files > created by mknod, by tagging them as new files. > > LSMs could also take some action after files are created. > > The new hook cannot return an error and cannot cause the operation to be > reverted. > > Signed-off-by: Roberto Sassu > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/namei.c | 5 +++++ > include/linux/lsm_hook_defs.h | 2 ++ > include/linux/security.h | 5 +++++ > security/security.c | 14 ++++++++++++++ > 4 files changed, 26 insertions(+) Acked-by: Paul Moore -- paul-moore.com