Skip to content

Wrapping up the vfs support for unprivileged mounts

Eric W. Biederman containers linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6vfs: Don't allow changing the link count of an inode with an invalid uid or gidfs/namei.c+10 -33 replies
2/6vfs: Allow userns root to call mknod on owned filesystems.fs/namei.c+2 -16 replies
3/6fs: Allow superblock owner to replace invalid owners of inodesfs/attr.c+28 -83 replies
4/6fs: Allow superblock owner to access do_remount_sb()fs/namespace.c+2 -24 replies
5/6capabilities: Allow privileged user in s_user_ns to set security.* xattrssecurity/commoncap.c+6 -21 reply
6/6fs: Allow CAP_SYS_ADMIN in s_user_ns to freeze and thaw filesystemsfs/ioctl.c+2 -21 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSeth ForsheeEric W. BiedermanSerge HallynChristian BraunerDongsu Park
SeriesInspired-by A-b A-b A-b A-b T-b T-b
1/6A-b A-b A-b
2/6A-b A-b A-b
3/6Inspired-by A-b Inspired-by A-b Inspired-by A-b A-b
4/6A-b A-b A-b
5/6A-b A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [REVIEW][PATCH 0/6] Wrapping up the vfs support for unprivileged mounts

Very slowly the work has been progressing to ensure the vfs has the necessary support for mounting filesystems without privilege.

This patchset contains one more core piece of that work, ensuring a few more operations that would write back an inode and confuse an exisiting filesystem are denied.

The rest of the changes actually enable userns root to do things with filesystems that the userns root has mounted. Most of these have been waiting in the wings a long time, held back because I wanted the core of the patchset to be solid before I started allowing additional behavor.

It is definitely time for these changes so the effect of s_user_ns becomes less theoretical.

The change to allow mknod is new, but consistent with everything else and harmless as device nodes on filesystems mounted without privilege are ignored.

Unless problems show up in the during review I plan to merge these changes.

These changes are also available at:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git userns-test

Eric W. Biederman (5):
vfs: Don't allow changing the link count of an inode with an invalid uid or gid
vfs: Allow userns root to call mknod on owned filesystems.
fs: Allow superblock owner to replace invalid owners of inodes
fs: Allow superblock owner to access do_remount_sb()
capabilities: Allow privileged user in s_user_ns to set security.* xattrs

Seth Forshee (1):
fs: Allow CAP_SYS_ADMIN in s_user_ns to freeze and thaw filesystems

 fs/attr.c            | 36 ++++++++++++++++++++++++++++--------
 fs/ioctl.c           |  4 ++--
 fs/namei.c           | 16 ++++++++++++----
 fs/namespace.c       |  4 ++--
 security/commoncap.c |  8 ++++++--
 5 files changed, 50 insertions(+), 18 deletions(-)

Eric