Question (related to UBUNTU: SAUCE: fs: Refuse uid/gid changes which don't map 
into s_user_ns)
---------------------------

When an overlayfs is mounted inside a user-namespace, should it permit
the creation of inodes in the upper layer with uids that are outside the
user-namespace?


My Tentative Answer  
-------------------

(TLDR; yes)
If a directory D is granted world-write permissions (in the initial namespace) 
via 'chmod -R a+rwX', then any user is permitted to edit or delete files in D, 
even if the files and D are owned by root.

If we subsequently enter a user-namespace, then we are still permitted
to edit files in D.

But if we enter a user-namespace and subsequently utilize D as the lower
layer of an overlayfs, then editing files in D necessitates the creation
of files in the upper layer with uids which are outside the user
namespace.

While restriciting the permissible range of uids in the upper layer may
well enhance security, it also limits the utility of overlayfs.
overlayfs will sometimes deny permissions which were granted in the
initial namespace.  overlayfs will remain useful for mounting a rootfs
(since all uids are within the user-namespace), but not for mounting
directories onto the rootfs.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1617388

Title:
  When using overlayfs with kernel 4.4, some files cannot be deleted.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1617388/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to