[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUCybaYK/0RLvY9J@redhat.com>
Date: Tue, 14 Sep 2021 10:32:13 -0400
From: Vivek Goyal <vgoyal@...hat.com>
To: Bruce Fields <bfields@...hat.com>
Cc: Casey Schaufler <casey@...aufler-ca.com>,
"Dr. David Alan Gilbert" <dgilbert@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, virtio-fs@...hat.com,
Daniel Walsh <dwalsh@...hat.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Casey Schaufler <casey.schaufler@...el.com>,
LSM <linux-security-module@...r.kernel.org>,
selinux@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
Miklos Szeredi <miklos@...redi.hu>,
Giuseppe Scrivano <gscrivan@...hat.com>,
stephen.smalley.work@...il.com,
Andreas Gruenbacher <agruenba@...hat.com>,
Dave Chinner <david@...morbit.com>
Subject: Re: [PATCH v3 0/1] Relax restrictions on user.* xattr
On Tue, Sep 14, 2021 at 09:59:19AM -0400, Bruce Fields wrote:
> On Tue, Sep 14, 2021 at 8:52 AM Vivek Goyal <vgoyal@...hat.com> wrote:
> > Same is the requirement for regular containers and that's why
> > podman (and possibly other container managers), make top level
> > storage directory only readable and searchable by root, so that
> > unpriveleged entities on host can not access container root filesystem
> > data.
>
> Note--if that directory is on NFS, making it readable and searchable
> by root is very weak protection, since it's often possible for an
> attacker to guess filehandles and access objects without the need for
> directory lookups.
open_by_handle_at() requires CAP_DAC_READ_SEARCH. And if you have
CAP_DAC_READ_SEARCH, you don't need to even guess file handles. You
should be able to read/search through all directories, IIUC.
So how does one make sure that shared directory on host is not
accessible to unprivileged entities. If making directory accessible
to root only is weaker security, what are the options for stronger
security.
Vivek
Powered by blists - more mailing lists