On Tue, Jan 24, 2017 at 09:37:18PM -0000, Jonathan Calmels wrote:
> Interesting, I tried to reproduce with a Debian strech 4.8.0-2-amd64
> (Debian 4.8.15-2) and 4.9.0-1-amd64 (Debian 4.9.2-2) and didn't hit the
> error.

Odd. The commit responsible for this should be 036d523641c6 "vfs: Don't
create inodes with a uid or gid unknown to the vfs" which did go into
4.8. I'll have to take another look.

> This seems to be specific to tmpfs though, touching the file anywhere
> else yields the nobody:nogroup mapping.

It would happen for any filesystem which was mounted from within the
user namespace.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1659087

Title:
  open(2) returns EOVERFLOW within tmpfs+userns

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  On Ubuntu 4.4.0-59.80-generic 4.4.35, open(2) returns EOVERFLOW when
  creating a file in tmpfs with user namespace enabled.

  This issue wasn't present in 4.4.0-47 and has probably been introduced
  by https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1634964

  Step to reproduce:

  $ unshare -r -U -m /bin/bash
  # mount -t tmpfs tmpfs /mnt
  # echo $$
  2354

  In another terminal:

  $ sudo nsenter -t 2354 -m      
  # touch /mnt/foo
  touch: cannot touch '/mnt/foo': Value too large for defined data type

  Note that we are not joining the user namespace when creating the file
  but we would expect `touch' to succeed and create the file with an
  inode set to INVALID_UID/GID (i.e. nobody:nogroup) within the mount
  namespace.

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

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to