lkml.org 
[lkml]   [2018]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: overlayfs access checks on underlying layers
From
Date
On 12/4/18 10:42 AM, Vivek Goyal wrote:
> On Tue, Dec 04, 2018 at 04:31:09PM +0100, Miklos Szeredi wrote:
>> On Tue, Dec 4, 2018 at 4:22 PM Vivek Goyal <vgoyal@redhat.com> wrote:
>>
>>> Having said that, this still create little anomaly when mknod to client
>>> is not allowed on context label. So a device file, which is on lower
>>> and client can not open it for read/write on host, it can now be opened
>>> for read/write because mounter will allow access. So why it is different
>>> that regular copy up. Well, in regular copy up, we created a copy of
>>> the original object and allowed writing to that object (cp --preserve=all)
>>> model. But in case of device file, writes will go to same original
>>> object. (And not a separate copy).
>>
>> That's true.
>>
>> In that sense copy up of special file should result in upper having
>> the same label as of lower, right?
>
> I guess that might be reasonable (if this behavior is a concern). So even
> after copy up, client will not be able to read/write a device if it was
> not allowed on lower.
>
> Stephen, what do you think about retaining label of lower for device
> files during copy up. What about socket/fifo.

We don't check client task access to the upper inode label, only to the
overlay, right? So the client is still free to access the device
through the overlay even if we preserve the lower inode label on the
upper inode? What do we gain?



\
 
 \ /
  Last update: 2018-12-04 17:05    [W:0.210 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site