Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp19377rdb; Wed, 7 Feb 2024 19:22:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHH+73zvsU/5pFGK1T40Yz3UoYxwJp3wjqKVB1wMQ5Rlxnf2sOg3hsZw+kFIx8USTYkjLQ6 X-Received: by 2002:a05:6402:70c:b0:55f:cb7a:c9fb with SMTP id w12-20020a056402070c00b0055fcb7ac9fbmr5729186edx.3.1707362519973; Wed, 07 Feb 2024 19:21:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707362519; cv=pass; d=google.com; s=arc-20160816; b=r+VyxJgx4yXWmVS8ym1fKTXd4jjSAoURKZ+rWMjozFfe+6PzgMyhba3waWTHC/Ajb7 Ia/d4IkNImhgpJssYzJv2tQy0UxgW5bLRlJ8FK1Syn6IUxHHemK3JUu94PtdZLUpko+/ ro9mZL67EeAIpgHoKKWpRDvegwzYwFicI33VgyAN12BQDas1gJ7N220bBvh+RxYPs0zu MOeDs8kQHO097uKte21L6isfSQGvLLg9iFCHzqH7vn9jsJBRu6Goh51B4fL5rK3uoJyd uk3OaLf38apT6B5yvUVIjANELQFxsxqhTG3LTyabRm5BFb1qsRl/S0zfKjAEamz4RDuM KAyw== 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=9NeCOLMO8D+Li8NPC6OAfEyheiTPtPHuLj+MlZ5sS28=; fh=GuMSrG/VN4HzE4T2yFLEz0wCe8nml3Y/pX0sd9vIWlg=; b=PdhJB1UoL9WvZrHlkrmflt30ttiwrkgzHZkerN6C0k/PI6kvul5j94U1+gajfKkYMb TI77/ux/T8nWdwebhXxfw1/qOO8HE34tfMCV7pkHBWq+vwfirFew8iAMaNLRhhWSFPe1 eLBi7fHv20fthullcikHDQcepnx4ofjxprf87adkWjeMjoEqJBeY5rwseRsP++vFJEra yJSYicH1aZun+2brouyCRk8fhkaqg2bYIGwcLUooi8uP00OEXKo7AhhKBye8XX2aeBRy cQSAtdSG2EKu4kJjXVVBY+B8Us27mB/ASLQCLRSrD4Qdps2gccaqE2RVz4YCy03vJ1CC QUBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b="Xr1Hy5o/"; 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-1841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1841-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; AJvYcCXP+kHK+CF8b19lXYV2neXdnQNnnNTh0mp8NlQsiQYCtJ1rI6rFGDPphUSmiVeRPlrMG0tBPJsfKAvAKht3p57PlpO2hoi9mZz4atFY0A== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g10-20020a0564021eca00b005610aa3fb49si208871edg.94.2024.02.07.19.21.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:21:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1841-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="Xr1Hy5o/"; 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-1841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1841-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 A0F8E1F2160F for ; Thu, 8 Feb 2024 03:21:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3900736126; Thu, 8 Feb 2024 03:18:49 +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="Xr1Hy5o/" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 EF305224EF for ; Thu, 8 Feb 2024 03:18:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707362328; cv=none; b=a8SZKmUpPHNFpVIYV9XQpVQmdMfNbVuFmnpIuzUdqbWp9s4Zn6wjLWoDnEJuHFwCfyVuinbD0kcc+I8UbcMg8o9khOvAwv7cqdGugfjPUJWl1n3gPffFHMIDuZZe9kDV2w2H5O/tTInOPrqYEvzNOvXQSGebQiIZsanzZDPK53g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707362328; c=relaxed/simple; bh=QBP1d2INSJJ5CT9OSZezCK5o0sFnfjm4zPqF0UwXyPQ=; h=Date:Message-ID:MIME-Version:Content-Type:Content-Disposition: From:To:Cc:Subject:References:In-Reply-To; b=XJqEklaVg888VX4jMvjmhJ2CWMHlWAKs9HM8T1EfA2X00TB5YclLgY4BgbP0b9bZweNrkqvqubQJomVK6NFGFCGIXi0x/x+tyFWXCXRMzbVLZFd6HIn7a2DYo7qJ8hSwt20j3Et5XMTCZgwDKSazJpzfE9qJLcXEYFb8HPr39+8= 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=Xr1Hy5o/; arc=none smtp.client-ip=209.85.219.50 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-qv1-f50.google.com with SMTP id 6a1803df08f44-68c53ed6c56so6197556d6.3 for ; Wed, 07 Feb 2024 19:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1707362323; x=1707967123; 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=9NeCOLMO8D+Li8NPC6OAfEyheiTPtPHuLj+MlZ5sS28=; b=Xr1Hy5o/HWC5bodVXx128sJc7lJpmuUvLstqpCCc+A9jOJCeYy/r6/a4f9Fkp31rzH n4S9rSMiXj+ZlXLK2SN3H+EBhOfaW+229RbOIztedCYqFn4bj8J8QJDneJWFepgupMJs Xa1qJLUMvLP9tt03iRMZwsY3ZVyO7bI22FeluRcl2A1wPPiM+EdKzWsTjFv0BCF+udgC 45tzIA2EuAWm5kR0ZwreDnNCPZnKMd0oElMv+1dmGPqrvZ14mLSIQH7dTBU9gnXZw9UC Cy/IndDxARtBfnZGG2eviAQl0mClYl/7kFCquHl24BKqmWXC4gfoGOR6fEoIF11ufTyF Uw3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707362323; x=1707967123; 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=9NeCOLMO8D+Li8NPC6OAfEyheiTPtPHuLj+MlZ5sS28=; b=IaabGCveJiAInkZQJhoUgxcyOqVk2wt8PmHGOvJ/lXvgCXT5K5Mek/bQdK2cZA2vqw RdeqAZmjQCa90Jf/9wP/8LeXPJgYeM3epOpxH9dKoYLEb17qnMj4aN6PS73nrZqaI+a7 m+cL4+zIseZ7BLrbL+ZqRhrYr0IgiD5w5wzwj0+UN52t+k4Z57xZaBml36PTdmBvzXxN AU9yHJSd5/2Nfj3mtg2x71DCjVAEiWf1e1fB9vtAv0OpUA2EpjNlv9LSYLe7u4tDpGEp kNHh41fVc5FiXH/b1WTbgyeT5KwF+EaSwLacRVA12q5F8lEJs/j/WcXgJ7MoG1mTgPdL XY6g== X-Gm-Message-State: AOJu0YyFKeeAGF+24jHHHEgX/eIyEALiLuhbCExzu5stjmjBwqNDTVqR BTSsq+NUZCMz5dQS6nTBUxlGtcRwrdq/EM1jDYycBrAgLo+T0Uyy+hWrqHYH5w== X-Received: by 2002:a0c:8f1a:0:b0:68c:71d7:293b with SMTP id z26-20020a0c8f1a000000b0068c71d7293bmr5353842qvd.44.1707362323236; Wed, 07 Feb 2024 19:18:43 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWYEqcz9JrBKdJctK6bEEzohG6WCY21Aj9JvhoHplqCM0z8a347REEjaeIk+wf8KfGiYxa6ouB7q8hYdpGF0E5jQtdD2aGGcnfBMu5uh0vhGOEZyYYuo5pbhbK6GcWClz2Qj9WFfcMC12XIoBFsGZL1xi3RNwiuQYkoCm7wI3mv6wV6yxmh0VK65WQEZXYFc6louGJ+I8KBeW7NQ+YWEoL8f5I5rg9UPEmkIHYtGqIRD1SqnZQW52jqmaAkm6VCjLpLSwdKEfvnhLTc1cUlUaL33HEeTK5CKd+0KfB55w7vOWLKL0mLINlCZqO+eC6MMwWmYVY65qJob0mCqALqwjjsSUJIIOKhvUTuIhspJ6LdbTkQhij+e6SiQKKYKv9CZ3sstnyHaMnVJqPFmU/UKda5HiYZ4VWm7A7V+hwwyFE03T58PFBVGkxrSIqIfUVVgVUGFMuVhorkUWL3NPEj0RWLDh7pR48MyZEeGwSEBuxt+e8m2iYHug3olk7ntinGmUoBDkSeOplCIgNNxNgGfqp3xXe0dV3BGX0XsH2A+p5DeqMLCxKo62JgZPLOOaH8ie26mnsu0E3CUZToHDMiH6khoau1QaM9BPcH9GOz8BMFFoBwB1g5xbtMhPWd9mf8F8E6QBYx9uTQzls7gic4tsp5bB9ScFw1AwLgohfQtER9gHqon/xCc5juRj8vbB4IHH5w58XgU0qGXocVblrNzc+gfnT5SMZJ8zg8actKuyQzIrcd8nK3yenkgcM0tNxONvXT4+fmQByf83Ecab9vHG9OJMh0ilXRsPOkbBryt6bJnLnShJpqbY8umfrrR5BbcGWyjGon0ukcaW6i+CSV+NTctQSJX30vGiPFq8Q3xyD3dHH4szAKAJOQp5GRlh/O5EFiCeKPZ/U88SheqaLSIrQAh1An9+5HMjE9CbtYbIMrjWZZyZwoDLIwDSkldf9T00uHx9 0yUyhnwvtY39M= Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id pz3-20020ad45503000000b0068cb4ed4840sm1179193qvb.62.2024.02.07.19.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:18:42 -0800 (PST) Date: Wed, 07 Feb 2024 22:18:42 -0500 Message-ID: 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 , Stefan Berger Subject: Re: [PATCH v9 11/25] security: Introduce inode_post_removexattr hook References: <20240115181809.885385-12-roberto.sassu@huaweicloud.com> In-Reply-To: <20240115181809.885385-12-roberto.sassu@huaweicloud.com> On Jan 15, 2024 Roberto Sassu wrote: > > In preparation for moving IMA and EVM to the LSM infrastructure, introduce > the inode_post_removexattr hook. > > At inode_removexattr hook, EVM verifies the file's existing HMAC value. At > inode_post_removexattr, EVM re-calculates the file's HMAC with the passed > xattr removed and other file metadata. > > Other LSMs could similarly take some action after successful xattr removal. > > The new hook cannot return an error and cannot cause the operation to be > reverted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Reviewed-by: Mimi Zohar > Reviewed-by: Casey Schaufler > --- > fs/xattr.c | 9 +++++---- > include/linux/lsm_hook_defs.h | 2 ++ > include/linux/security.h | 5 +++++ > security/security.c | 14 ++++++++++++++ > 4 files changed, 26 insertions(+), 4 deletions(-) Acked-by: Paul Moore -- paul-moore.com