[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL7ro1H-g27GKNg8fC-mS4H-G-Zsowtut+bNMCqt3P7Bv7yteg@mail.gmail.com>
Date: Tue, 7 Feb 2023 09:12:21 +0100
From: Alexander Larsson <alexl@...hat.com>
To: Amir Goldstein <amir73il@...il.com>
Cc: Miklos Szeredi <miklos@...redi.hu>, gscrivan@...hat.com,
brauner@...nel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, david@...morbit.com,
viro@...iv.linux.org.uk, Vivek Goyal <vgoyal@...hat.com>,
Josef Bacik <josef@...icpanda.com>,
Gao Xiang <hsiangkao@...ux.alibaba.com>,
Jingbo Xu <jefflexu@...ux.alibaba.com>
Subject: Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified
image filesystem
On Mon, Feb 6, 2023 at 9:06 PM Amir Goldstein <amir73il@...il.com> wrote:
>
> On Mon, Feb 6, 2023 at 9:32 PM Miklos Szeredi <miklos@...redi.hu> wrote:
> >
> > On Mon, 6 Feb 2023 at 18:16, Amir Goldstein <amir73il@...il.com> wrote:
> >
> > > it's not overlay{erofs+erofs}
> > > it's overlay{erofs+ext4} (or another fs-verity [1] supporting fs)
> > > the lower layer is a mutable fs with /objects/ dir containing
> > > the blobs.
> > >
> > > The way to ensure the integrity of erofs is to setup dm-verity at
> > > erofs mount time.
> > >
> > > The way to ensure the integrity of the blobs is to store an fs-verity
> > > signature of each blob file in trusted.overlay.verify xattr on the
> > > metacopy and for overlayfs to enable fsverity on the blob file before
> > > allowing access to the lowerdata.
> > >
> > > At least this is my understanding of the security model.
> >
> > So this should work out of the box, right?
> >
>
> Mostly. IIUC, overlayfs just needs to verify the signature on
> open to fulfill the chain of trust, see cfs_open_file():
> https://lore.kernel.org/linux-fsdevel/9b799ec7e403ba814e7bc097b1e8bd5f7662d596.1674227308.git.alexl@redhat.com/
Yeah, we need to add an "overlay.digest" xattr which if specified
contains the expected fs-verity digest of the content file for the
metacopy file.
We also need to export fsverity_get_digest for module use:
https://lore.kernel.org/linux-fsdevel/f5f292caee6b288d39112486ee1b2daef590c3ec.1674227308.git.alexl@redhat.com/
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl@...hat.com alexander.larsson@...il.com
Powered by blists - more mailing lists