From: Dave Chinner <david@fromorbit.com>
To: James Morris <jmorris@namei.org>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
Alan Cox <gnomes@lxorguk.ukuu.org.uk>, TongZhang <ztong@vt.edu>,
linux-xfs@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-security-module@vger.kernel.org,
Wenbo Shen <shenwenbosmile@gmail.com>,
Stephen Smalley <sds@tycho.nsa.gov>,
Paul Moore <paul@paul-moore.com>
Subject: Re: Leaking Path in XFS's ioctl interface(missing LSM check)
Date: Wed, 3 Oct 2018 08:42:40 +1000 [thread overview]
Message-ID: <20181002224240.GP18567@dastard> (raw)
In-Reply-To: <alpine.LRH.2.21.1810030518240.17817@namei.org>
On Wed, Oct 03, 2018 at 05:20:31AM +1000, James Morris wrote:
> On Tue, 2 Oct 2018, Dave Chinner wrote:
>
> > On Tue, Oct 02, 2018 at 06:08:16AM +1000, James Morris wrote:
> > > On Mon, 1 Oct 2018, Darrick J. Wong wrote:
> > >
> > > > If we /did/ replace CAP_SYS_ADMIN checking with a pile of LSM hooks,
> > >
> > > Not sure we'd need a pile of hooks, what about just "read" and "write"
> > > storage admin?
> > >
> > > Or even two new capabilities along these lines, which we convert existing
> > > CAP_SYS_ADMIN etc. to?
> >
> > So instead of having hundreds of management ioctls under
> > CAP_SYS_ADMIN, we'd now have hundreds of non-storage ioctls under
> > CAP_SYS_ADMIN and hundreds of storage ioctls under
> > CAP_SYS_STORAGE_ADMIN?
> >
> > Maybe I'm missing something, but I don't see how that improves the
> > situation w.r.t. locked down LSM configurations?
>
> I'm not sure about capabilities, but having two specific LSM hooks for
> storage admin would allow SELinux et al to explicitly control privileged
> access to these interfaces. Storage admin seems to be a special case of
> its own which we want to be able to mediate as such.
Perhaps so - as a stepping stone it would allow isolation in
specific cases where no management should be allowed, but there are
cases with modern filesystems where users need access to storage
APIs.
e.g. It's entirely plausible that /home is set up as a subvolume per
user, and that subvols in a fileystem can be independently
snapshotted. Hence it would be completely acceptible to allow users
to have access to snapshot management APIs to be able to snapshot
their home directories for backup/rollback purposes.
Hence I'm not sure that black/white storage admin LSM hooks are a
solution that will end up being particularly useful to the wider
population...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-10-02 22:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 0:51 Leaking Path in XFS's ioctl interface(missing LSM check) TongZhang
2018-09-26 1:33 ` Dave Chinner
2018-09-26 13:23 ` Stephen Smalley
2018-09-27 2:08 ` Dave Chinner
2018-09-26 18:24 ` Alan Cox
2018-09-27 1:38 ` Dave Chinner
2018-09-27 21:23 ` James Morris
2018-09-27 22:19 ` Dave Chinner
2018-09-27 23:12 ` Tetsuo Handa
2018-09-30 14:16 ` Alan Cox
2018-10-01 0:25 ` Dave Chinner
[not found] ` <20181001160442.47c798bc@alans-desktop>
[not found] ` <20181001154459.GB5872@magnolia>
2018-10-01 20:08 ` James Morris
2018-10-01 22:45 ` Dave Chinner
2018-10-02 19:20 ` James Morris
2018-10-02 22:42 ` Dave Chinner [this message]
[not found] ` <20181001152529.GA2549@thunk.org>
2018-10-01 22:53 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181002224240.GP18567@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=sds@tycho.nsa.gov \
--cc=shenwenbosmile@gmail.com \
--cc=ztong@vt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).