This is a note to let you know that I've just added the patch titled umount: Disallow unprivileged mount force to the 3.17-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: umount-disallow-unprivileged-mount-force.patch and it can be found in the queue-3.17 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b2f5d4dc38e034eecb7987e513255265ff9aa1cf Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Date: Sat, 4 Oct 2014 14:44:03 -0700 Subject: umount: Disallow unprivileged mount force From: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> commit b2f5d4dc38e034eecb7987e513255265ff9aa1cf upstream. Forced unmount affects not just the mount namespace but the underlying superblock as well. Restrict forced unmount to the global root user for now. Otherwise it becomes possible a user in a less privileged mount namespace to force the shutdown of a superblock of a filesystem in a more privileged mount namespace, allowing a DOS attack on root. Signed-off-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/namespace.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1432,6 +1432,9 @@ SYSCALL_DEFINE2(umount, char __user *, n goto dput_and_out; if (mnt->mnt.mnt_flags & MNT_LOCKED) goto dput_and_out; + retval = -EPERM; + if (flags & MNT_FORCE && !capable(CAP_SYS_ADMIN)) + goto dput_and_out; retval = do_umount(mnt, flags); dput_and_out: Patches currently in stable-queue which might be from ebiederm@xxxxxxxxxxxx are queue-3.17/mnt-update-unprivileged-remount-test.patch queue-3.17/mnt-fix-a-memory-stomp-in-umount.patch queue-3.17/userns-check-euid-no-fsuid-when-establishing-an-unprivileged-uid-mapping.patch queue-3.17/mnt-implicitly-add-mnt_nodev-on-remount-when-it-was-implicitly-added-by-mount.patch queue-3.17/userns-don-t-allow-unprivileged-creation-of-gid-mappings.patch queue-3.17/userns-rename-id_map_mutex-to-userns_state_mutex.patch queue-3.17/userns-add-a-knob-to-disable-setgroups-on-a-per-user-namespace-basis.patch queue-3.17/userns-allow-setting-gid_maps-without-privilege-when-setgroups-is-disabled.patch queue-3.17/userns-don-t-allow-setgroups-until-a-gid-mapping-has-been-setablished.patch queue-3.17/groups-consolidate-the-setgroups-permission-checks.patch queue-3.17/userns-only-allow-the-creator-of-the-userns-unprivileged-mappings.patch queue-3.17/userns-document-what-the-invariant-required-for-safe-unprivileged-mappings.patch queue-3.17/umount-disallow-unprivileged-mount-force.patch queue-3.17/userns-unbreak-the-unprivileged-remount-tests.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html