[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wpv6a8hl.fsf@x220.int.ebiederm.org>
Date: Thu, 01 Oct 2015 10:55:50 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Mike Snitzer <snitzer@...hat.com>
Cc: Seth Forshee <seth.forshee@...onical.com>,
Kent Overstreet <kent.overstreet@...il.com>,
Alasdair Kergon <agk@...hat.com>, dm-devel@...hat.com,
Neil Brown <neilb@...e.com>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.com>,
Jeff Layton <jlayton@...chiereds.net>,
"J. Bruce Fields" <bfields@...ldses.org>,
Serge Hallyn <serge.hallyn@...onical.com>,
Andy Lutomirski <luto@...capital.net>,
linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org, selinux@...ho.nsa.gov,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-bcache@...r.kernel.org, linux-raid@...r.kernel.org
Subject: Re: [PATCH 1/5] fs: Verify access of user towards block device file when mounting
Mike Snitzer <snitzer@...hat.com> writes:
> What layer establishes access rights to historically root-only
> priviledged block devices? Is it user namespaces?
Block devices are weird.
Mounts historically have not checked the permissions on the block
devices because a mounter has CAP_SYS_ADMIN.
Unprivileged users are allowes to read/write block devices if
someone has given them permissions on the device node in the
filesystem.
The thinking with this patchset is to start performing the normal
block device access permission checks when mounting filesystems
when the mounter does not have the global CAP_SYS_ADMIN permission.
The truth is we are not much past the point of realizing that there were
no permission checks to use the actual block device passed in to mount,
so we could still be missing something. There is a lot going on with dm,
md, and lvm. I don't know if the model of just look at the block device
inode and perform the permission checks is good enough.
> I haven't kept up with user namespaces as it relates to stacking block
> drivers like DM. But I'm happy to come up to speed and at the same time
> help you verify all works as expected with DM blocks devices...
We are just getting there. But if you can help that would be great.
The primary concern with dm is what happens when unprivileged users get
ahold of the code, and what happens when evil users corrupt the on-disk
format.
In principle dm like loop should be safe to use if there are not bugs
that make it unsafe for unprivileged users to access the code.
The goal if possible is to run things like docker without needed to be
root or even more fun to run docker in a container, and in general
enable nested containers.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists