lkml.org 
[lkml]   [2014]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] fuse: Allow mounts from user namespaces
From
On Mon, Jul 21, 2014 at 2:47 PM, Seth Forshee
<seth.forshee@canonical.com> wrote:
> On Fri, Jul 18, 2014 at 05:33:23PM +0200, Miklos Szeredi wrote:
>> On Mon, Jul 14, 2014 at 9:18 PM, Seth Forshee
>> <seth.forshee@canonical.com> wrote:
>> > Update fuse to allow mounts from user namespaces. During mount
>> > current_user_ns() is stashed away,
>>
>> Same thing here. While practically this may work, it's theoretically
>> wrong, and possibly may go wrong in special situations. In fuse
>> there's no official "server process", so storing information, like
>> namespace, about one is going to be wrong.
>
> What you're suggesting would probably work fine when dealing with pids.
> It's not going to work though for the checks I've added in
> fuse_allow_current_process() that the process is in the mount owner's
> user ns, and without those checks or something similar I don't think
> it's safe to permit allow_other for user ns mounts.

You can add that check in fuse_dev_do_read() as well. If the
fsuid/fsgid doesn't exist in the "server's" namespace, then set
req->out.h.error and call request_end().

> Can you elaborate on what special situations might violate these
> assumptions or otherwise cause problems?

What's preventing a fuse fs implementation from handling FUSE_INIT in
one process and then handling the rest in a different process
(possibly in a different namespace)?

Thanks,
Miklos


\
 
 \ /
  Last update: 2014-07-21 16:22    [W:0.063 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site