Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4593266rdh; Wed, 29 Nov 2023 05:59:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIWkm+hvbLmyjO8Thsm9awtSVwzBmFXbTTNo5O03kvltlcymtw/GcJWvMzUJJmy5pryXF/ X-Received: by 2002:ae9:f30d:0:b0:77d:88eb:d734 with SMTP id p13-20020ae9f30d000000b0077d88ebd734mr17330419qkg.35.1701266365809; Wed, 29 Nov 2023 05:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701266365; cv=none; d=google.com; s=arc-20160816; b=iR3uUHFCEKwGE/S45Ok07eJoIOVfsa6KgDrczkeYFK9Xzq6nfTJHDSvWtp53zTbSyU t3cWMTECKEzWhEiTJpkIHNK1cqB8B7k0tToVibiXCQ+vvTL5RJ1OYcH88y7jZtff/vUR /Yo22HvuP2sUSmIY55+MVXl1HRx0cHuJmJTBm7X/s+ZZzGXrEWOYAXLsa1xsApjDfYpd Xj2Tb5rnXYEP7lIahBZo1S4L9yypRIpolQfhA8JpI7A+kb0dxI3w+wuTBU0JOcxbsSGH F9BQCH/YbJaCckoD9zbQhIcEzN+dFD3+T0tDTpDuQp1Z/TXvAcl4r0RfWGtkLfkWdZqX plqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=baJrRhbX2jEW5GTxaymILuftVip7hmO7jVsjMImIU24=; fh=34P2Tn1w879pv2bKBkfpopDOpz7u/zrbLWZn3NlG648=; b=OWVTMBUtkT9OkyG37d4ReOkh2ecDydyNowVs7z0tvXxM5803jnJDFgHyO7bM+zDuqt QvXlqWjojFnpyVkrGI05kXGryAUg7Xm8zIXZifD5EG5fABQxsCE5kPLt42E6F6zwQ5sF Km1bTlsSZLX+ZlXssIJSFl8VSALSYPkiLzc+vazZAxYhU0CsiI95GMYbIt2JSyB7qzq0 2jEMiBr6YlHiZh0iZzGQ5++LnbVKTsRNLzE5/l+7RlJ67Hd1osIPXZ8/QbqTx5M3ll2Q 8Yp3FPMXb2JAldXrTr9f4V8xPTNN5gmG5ZeognQRLjtOKVfH69UhXKJ7OGzBehNNDj0o vzkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-168-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-168-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e14-20020a05620a014e00b0076841128d10si12984861qkn.533.2023.11.29.05.59.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 05:59:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-168-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-168-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-168-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5EC171C20B6E for ; Wed, 29 Nov 2023 13:59:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CEB4241F9; Wed, 29 Nov 2023 13:59:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-nfs@vger.kernel.org Received: from frasgout13.his.huawei.com (frasgout13.his.huawei.com [14.137.139.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB89194; Wed, 29 Nov 2023 05:59:14 -0800 (PST) Received: from mail.maildlp.com (unknown [172.18.186.29]) by frasgout13.his.huawei.com (SkyGuard) with ESMTP id 4SgLDl56bJz9yj8G; Wed, 29 Nov 2023 21:45:27 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.47]) by mail.maildlp.com (Postfix) with ESMTP id D15BA140EF6; Wed, 29 Nov 2023 21:59:01 +0800 (CST) Received: from [127.0.0.1] (unknown [10.204.63.22]) by APP1 (Coremail) with SMTP id LxC2BwAXBXWWQ2dl9huYAQ--.12390S2; Wed, 29 Nov 2023 14:59:01 +0100 (CET) Message-ID: Subject: Re: [PATCH v5 23/23] integrity: Switch from rbtree to LSM-managed blob for integrity_iint_cache From: Roberto Sassu To: Paul Moore Cc: 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, dhowells@redhat.com, jarkko@kernel.org, stephen.smalley.work@gmail.com, eparis@parisplace.org, casey@schaufler-ca.com, mic@digikod.net, linux-fsdevel@vger.kernel.org, linux-kernel@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, Roberto Sassu Date: Wed, 29 Nov 2023 14:58:43 +0100 In-Reply-To: References: <20231107134012.682009-24-roberto.sassu@huaweicloud.com> <17befa132379d37977fc854a8af25f6d.paul@paul-moore.com> <2084adba3c27a606cbc5ed7b3214f61427a829dd.camel@huaweicloud.com> Content-Type: multipart/mixed; boundary="=-dQHfNo6Rgr2qySNqlTbY" User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe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CY1x0267AKxVW8JVW8Jr1l6VACY4 xI67k04243AbIYCTnIWIevJa73UjIFyTuYvjxUFl1vDUUUU X-CM-SenderInfo: purev21wro2thvvxqx5xdzvxpfor3voofrz/1tbiAgAQBF1jj5MP1AACst --=-dQHfNo6Rgr2qySNqlTbY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2023-11-29 at 13:27 +0100, Roberto Sassu wrote: > On Mon, 2023-11-20 at 16:06 -0500, Paul Moore wrote: > > On Mon, Nov 20, 2023 at 3:16=E2=80=AFAM Roberto Sassu > > wrote: > > > On Fri, 2023-11-17 at 15:57 -0500, Paul Moore wrote: > > > > On Nov 7, 2023 Roberto Sassu wrote= : > > > > >=20 > > > > > Before the security field of kernel objects could be shared among= LSMs with > > > > > the LSM stacking feature, IMA and EVM had to rely on an alternati= ve storage > > > > > of inode metadata. The association between inode metadata and ino= de is > > > > > maintained through an rbtree. > > > > >=20 > > > > > Because of this alternative storage mechanism, there was no need = to use > > > > > disjoint inode metadata, so IMA and EVM today still share them. > > > > >=20 > > > > > With the reservation mechanism offered by the LSM infrastructure,= the > > > > > rbtree is no longer necessary, as each LSM could reserve a space = in the > > > > > security blob for each inode. However, since IMA and EVM share th= e > > > > > inode metadata, they cannot directly reserve the space for them. > > > > >=20 > > > > > Instead, request from the 'integrity' LSM a space in the security= blob for > > > > > the pointer of inode metadata (integrity_iint_cache structure). T= he other > > > > > reason for keeping the 'integrity' LSM is to preserve the origina= l ordering > > > > > of IMA and EVM functions as when they were hardcoded. > > > > >=20 > > > > > Prefer reserving space for a pointer to allocating the integrity_= iint_cache > > > > > structure directly, as IMA would require it only for a subset of = inodes. > > > > > Always allocating it would cause a waste of memory. > > > > >=20 > > > > > Introduce two primitives for getting and setting the pointer of > > > > > integrity_iint_cache in the security blob, respectively > > > > > integrity_inode_get_iint() and integrity_inode_set_iint(). This w= ould make > > > > > the code more understandable, as they directly replace rbtree ope= rations. > > > > >=20 > > > > > Locking is not needed, as access to inode metadata is not shared,= it is per > > > > > inode. > > > > >=20 > > > > > Signed-off-by: Roberto Sassu > > > > > Reviewed-by: Casey Schaufler > > > > > Reviewed-by: Mimi Zohar > > > > > --- > > > > > security/integrity/iint.c | 71 +++++-----------------------= ------ > > > > > security/integrity/integrity.h | 20 +++++++++- > > > > > 2 files changed, 29 insertions(+), 62 deletions(-) > > > > >=20 > > > > > diff --git a/security/integrity/iint.c b/security/integrity/iint.= c > > > > > index 882fde2a2607..a5edd3c70784 100644 > > > > > --- a/security/integrity/iint.c > > > > > +++ b/security/integrity/iint.c > > > > > @@ -231,6 +175,10 @@ static int __init integrity_lsm_init(void) > > > > > return 0; > > > > > } > > > > >=20 > > > > > +struct lsm_blob_sizes integrity_blob_sizes __ro_after_init =3D { > > > > > + .lbs_inode =3D sizeof(struct integrity_iint_cache *), > > > > > +}; > > > >=20 > > > > I'll admit that I'm likely missing an important detail, but is ther= e > > > > a reason why you couldn't stash the integrity_iint_cache struct > > > > directly in the inode's security blob instead of the pointer? For > > > > example: > > > >=20 > > > > struct lsm_blob_sizes ... =3D { > > > > .lbs_inode =3D sizeof(struct integrity_iint_cache), > > > > }; > > > >=20 > > > > struct integrity_iint_cache *integrity_inode_get(inode) > > > > { > > > > if (unlikely(!inode->isecurity)) > > > > return NULL; > > > > return inode->i_security + integrity_blob_sizes.lbs_inode; > > > > } > > >=20 > > > It would increase memory occupation. Sometimes the IMA policy > > > encompasses a small subset of the inodes. Allocating the full > > > integrity_iint_cache would be a waste of memory, I guess? > >=20 > > Perhaps, but if it allows us to remove another layer of dynamic memory > > I would argue that it may be worth the cost. It's also worth > > considering the size of integrity_iint_cache, while it isn't small, it > > isn't exactly huge either. > >=20 > > > On the other hand... (did not think fully about that) if we embed the > > > full structure in the security blob, we already have a mutex availabl= e > > > to use, and we don't need to take the inode lock (?). > >=20 > > That would be excellent, getting rid of a layer of locking would be sig= nificant. > >=20 > > > I'm fully convinced that we can improve the implementation > > > significantly. I just was really hoping to go step by step and not > > > accumulating improvements as dependency for moving IMA and EVM to the > > > LSM infrastructure. > >=20 > > I understand, and I agree that an iterative approach is a good idea, I > > just want to make sure we keep things tidy from a user perspective, > > i.e. not exposing the "integrity" LSM when it isn't required. >=20 > Ok, I went back to it again. >=20 > I think trying to separate integrity metadata is premature now, too > many things at the same time. >=20 > I started to think, does EVM really need integrity metadata or it can > work without? >=20 > The fact is that CONFIG_IMA=3Dn and CONFIG_EVM=3Dy is allowed, so we have > the same problem now. What if we make IMA the one that manages > integrity metadata, so that we can remove the 'integrity' LSM? >=20 > So, no embedding the full structure in the security blob now, move > integrity_inode_free() and integrity_kernel_module_request() to IMA, > call integrity_iintcache_init() from IMA. >=20 > EVM verification of new files would fail without IMA, but it would be > the same now. >=20 > Also, evm_verifyxattr() would only work with IMA, as it assumes that > the latter creates integrity metadata and passes them as argument. >=20 > Regarding the LSM order, I would take Casey's suggestion of introducing > LSM_ORDER_REALLY_LAST, for EVM. I attach the diff v5..v7. Tests passes with both IMA and EVM enabled. I did minor tweaks to the tests to take into account the possibility that IMA is disabled, and tests pass also in this case. Roberto --=-dQHfNo6Rgr2qySNqlTbY Content-Disposition: attachment; filename="ima_evm_lsms_v5_v7.diff" Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="ima_evm_lsms_v5_v7.diff"; charset="UTF-8" ZGlmZiAtLWdpdCBhL2ZzL2ZpbGVfdGFibGUuYyBiL2ZzL2ZpbGVfdGFibGUuYwppbmRleCBlNjRi MDA1N2ZhNzIuLjA0MDFhYzk4MjgxYyAxMDA2NDQKLS0tIGEvZnMvZmlsZV90YWJsZS5jCisrKyBi L2ZzL2ZpbGVfdGFibGUuYwpAQCAtMzg0LDcgKzM4NCw3IEBAIHN0YXRpYyB2b2lkIF9fZnB1dChz dHJ1Y3QgZmlsZSAqZmlsZSkKIAlldmVudHBvbGxfcmVsZWFzZShmaWxlKTsKIAlsb2Nrc19yZW1v dmVfZmlsZShmaWxlKTsKIAotCXNlY3VyaXR5X2ZpbGVfcHJl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