Skip to content

userns: review of bug fixes for 3.19-rcX

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18mnt: Implicitly add MNT_NODEV on remount when it was implicitly added by mountfs/namespace.c+7 -10 replies
2/18mnt: Update unprivileged remount testtools/testing/selftests/mount/unprivileged-remount-test.c+142 -300 replies
3/18umount: Disallow unprivileged mount forcefs/namespace.c+3 -05 replies
4/18umount: Do not allow unmounting rootfs.fs/namespace.c+1 -00 replies
5/18mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers.fs/namespace.c fs/pnode.c+1 -10 replies
6/18mnt: Carefully set CL_UNPRIVILEGED in clone_mntfs/namespace.c+2 -10 replies
7/18mnt: Clear mnt_expire during pivot_rootfs/namespace.c+2 -00 replies
8/18groups: Consolidate the setgroups permission checksarch/s390/kernel/compat_linux.c include/linux/cred.h kernel/groups.c +1 more+11 -30 replies
9/18userns: Document what the invariant required for safe unprivileged mappings.kernel/user_namespace.c+3 -10 replies
10/18userns: Don't allow setgroups until a gid mapping has been setablishedinclude/linux/user_namespace.h kernel/groups.c kernel/user_namespace.c+22 -10 replies
11/18userns: Don't allow unprivileged creation of gid mappingskernel/user_namespace.c+0 -40 replies
12/18userns: Check euid no fsuid when establishing an unprivileged uid mappingkernel/user_namespace.c+1 -10 replies
13/18userns: Only allow the creator of the userns unprivileged mappingskernel/user_namespace.c+4 -20 replies
14/18userns: Rename id_map_mutex to userns_state_mutexkernel/user_namespace.c+6 -80 replies
15/18userns: Add a knob to disable setgroups on a per user namespace basisfs/proc/base.c include/linux/user_namespace.h kernel/user.c +1 more+146 -00 replies
16/18userns: Allow setting gid_maps without privilege when setgroups is disabledkernel/user_namespace.c+5 -00 replies
17/18userns; Correct the comment in map_writekernel/user_namespace.c+1 -10 replies
18/18userns: Unbreak the unprivileged remount teststools/testing/selftests/mount/unprivileged-remount-test.c+24 -80 replies

Reviews trailers per patch

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

PatchRichard WeinbergerChen HanxiaoCedric BosdonnatAndy Lutomirski
SeriesT-b T-b T-b T-b R-b R-b R-b R-b
1/18T-b T-b
2/18
3/18
4/18
5/18
6/18
7/18
8/18
9/18
10/18R-b
11/18R-b
12/18R-b
13/18R-b
14/18R-b
15/18
16/18R-b
17/18
18/18

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

Read the v1 thread

Cover letter [PATCH review 00/18] userns: review of bug fixes for 3.19-rcX

The entire tree for testing is available at:
git.kernel.org:/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-testing

This is my queue of important bug fixes for user namespaces. Most of these changes warrant being backported. A few are bug fixes for cases where only root can trigger the issue so have not been marked for being back ported to stable.

A few of these patches have not been posted for review preivously, so I a giving the light of mailling list before I send them to Linus. This patchset has seen some testing already.

Since there are small deliberate breakage of userspace in here the more reviewers/testers the better.

Baring complictions I intend to ask Linus to pull this patchset sometime early next week.

So far nothing broke on my libvirt-lxc test bed. :-) Tested with openSUSE 13.2 and libvirt 1.2.9.

Tested on Fedora20 with libvirt 1.2.11, works fine.

Eric W. Biederman (18):
mnt: Implicitly add MNT_NODEV on remount when it was implicitly added by mount
mnt: Update unprivileged remount test
umount: Disallow unprivileged mount force
umount: Do not allow unmounting rootfs.
mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers.
mnt: Carefully set CL_UNPRIVILEGED in clone_mnt
mnt: Clear mnt_expire during pivot_root
groups: Consolidate the setgroups permission checks
userns: Document what the invariant required for safe unprivileged mappings.
userns: Don't allow setgroups until a gid mapping has been setablished
userns: Don't allow unprivileged creation of gid mappings
userns: Check euid no fsuid when establishing an unprivileged uid mapping
userns: Only allow the creator of the userns unprivileged mappings
userns: Rename id_map_mutex to userns_state_mutex
userns: Add a knob to disable setgroups on a per user namespace basis
userns: Allow setting gid_maps without privilege when setgroups is disabled userns; Correct the comment in map_write
userns: Unbreak the unprivileged remount tests