[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240301-zucht-umfeld-9a923a7d070a@brauner>
Date: Fri, 1 Mar 2024 13:54:13 +0100
From: Christian Brauner <brauner@...nel.org>
To: Roberto Sassu <roberto.sassu@...weicloud.com>
Cc: "Seth Forshee (DigitalOcean)" <sforshee@...nel.org>,
Serge Hallyn <serge@...lyn.com>, Paul Moore <paul@...l-moore.com>, Eric Paris <eparis@...hat.com>,
James Morris <jmorris@...ei.org>, Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>, Stephen Smalley <stephen.smalley.work@...il.com>,
Ondrej Mosnacek <omosnace@...hat.com>, Casey Schaufler <casey@...aufler-ca.com>,
Mimi Zohar <zohar@...ux.ibm.com>, Roberto Sassu <roberto.sassu@...wei.com>,
Dmitry Kasatkin <dmitry.kasatkin@...il.com>, Eric Snowberg <eric.snowberg@...cle.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>, Jonathan Corbet <corbet@....net>,
Miklos Szeredi <miklos@...redi.hu>, Amir Goldstein <amir73il@...il.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org, audit@...r.kernel.org, selinux@...r.kernel.org,
linux-integrity@...r.kernel.org, linux-doc@...r.kernel.org, linux-unionfs@...r.kernel.org
Subject: Re: [PATCH v2 14/25] evm: add support for fscaps security hooks
On Fri, Mar 01, 2024 at 10:19:13AM +0100, Roberto Sassu wrote:
> On Wed, 2024-02-21 at 15:24 -0600, Seth Forshee (DigitalOcean) wrote:
> > Support the new fscaps security hooks by converting the vfs_caps to raw
> > xattr data and then handling them the same as other xattrs.
>
> Hi Seth
>
> I started looking at this patch set.
>
> The first question I have is if you are also going to update libcap
> (and also tar, I guess), since both deal with the raw xattr.
>
> From IMA/EVM perspective (Mimi will add on that), I guess it is
> important that files with a signature/HMAC continue to be accessible
> after applying this patch set.
>
> Looking at the code, it seems the case (if I understood correctly,
> vfs_getxattr_alloc() is still allowed).
>
> To be sure that everything works, it would be really nice if you could
> also extend our test suite:
>
> https://github.com/mimizohar/ima-evm-utils/blob/next-testing/tests/portable_signatures.test
>
> and
>
> https://github.com/mimizohar/ima-evm-utils/blob/next-testing/tests/evm_hmac.test
>
>
> The first test we would need to extend is check_cp_preserve_xattrs,
> which basically does a cp -a. We would need to set fscaps in the
> origin, copy to the destination, and see if the latter is accessible.
>
> I would also extend:
>
> check_tar_extract_xattrs_different_owner
> check_tar_extract_xattrs_same_owner
> check_metadata_change
> check_evm_revalidate
> check_evm_portable_sig_ima_appraisal
> check_evm_portable_sig_ima_measurement_list
>
> It should not be too complicated. The purpose would be to exercise your
> code below.
>
>
> Regarding the second test, we would need to extend just check_evm_hmac.
>
>
> Just realized, before extending the tests, it would be necessary to
> modify also evmctl.c, to retrieve fscaps through the new interfaces,
> and to let users provide custom fscaps the HMAC or portable signature
> is calculated on.
While request for tests are obviously fine they should be added by the
respective experts for IMA/EVM in this case. I don't think it's
appropriate to expect Seth to do that especially because you seem to
imply that you currently don't have any tests for fscaps at all. We're
always happy to test things and if that'd be adding new IMA/EVM specific
features than it would be something to discuss but really we're
refactoring so the fact that you don't have tests we can run is not the
fault of this patchset and IMA/EVM is just a small portion of it.
Powered by blists - more mailing lists