[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181204161506.GB16818@redhat.com>
Date: Tue, 4 Dec 2018 11:15:06 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Stephen Smalley <sds@...ho.nsa.gov>
Cc: Miklos Szeredi <miklos@...redi.hu>,
Ondrej Mosnacek <omosnace@...hat.com>,
"J. Bruce Fields" <bfields@...ldses.org>,
Mark Salyzyn <salyzyn@...roid.com>,
Paul Moore <paul@...l-moore.com>, linux-kernel@...r.kernel.org,
overlayfs <linux-unionfs@...r.kernel.org>,
linux-fsdevel@...r.kernel.org, selinux@...r.kernel.org,
Daniel J Walsh <dwalsh@...hat.com>
Subject: Re: overlayfs access checks on underlying layers
On Tue, Dec 04, 2018 at 10:42:35AM -0500, Stephen Smalley wrote:
[..]
> > > Yes, in that case there isn't an escalation of privilege for the mounter (I
> > > acknowledged that above). I'm still not sure copy-up of special files is a
> > > good idea though:
> > >
> > > - In the case of device files, there is the potential for mischief by the
> > > client task in misusing the mounter's privileges to gain access to otherwise
> > > unusable device node (nodev lower vs upper?),
> >
> > I was thinking about it as well. But client can always bypass permissions
> > of lower device inode by first removing device file and then by doing
> > a mknod. And that will be equivalent of copy up. IOW, IIUC, we do not deny
> > mknod to client and that always creates a way for it to write to device
> > file (and it does not matter what are permissions on lower?)
>
> I'm not sure what you mean by "we do not deny mknod to client". Depends on
> your policy and what context the client is running in. Plenty of situations
> where the client is not allowed to create device files directly, and the
> mounter is.
>
Oh, I meant for the cases where policy allows client to mknod with context
label. In that case, it does not matter what's the label on lower. Client
can always bypass it by first removing device node and creating a new
device node.
Thanks
Vivek
Powered by blists - more mailing lists