This is a note to let you know that I've just added the patch titled
umount: Disallow unprivileged mount force
to the 3.18-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.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b2f5d4dc38e034eecb7987e513255265ff9aa1cf Mon Sep 17 00:00:00 2001
From: "Eric W. Biederman" <[email protected]>
Date: Sat, 4 Oct 2014 14:44:03 -0700
Subject: umount: Disallow unprivileged mount force
From: "Eric W. Biederman" <[email protected]>
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" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/namespace.c | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1546,6 +1546,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 [email protected] are
queue-3.18/mnt-update-unprivileged-remount-test.patch
queue-3.18/mnt-fix-a-memory-stomp-in-umount.patch
queue-3.18/userns-check-euid-no-fsuid-when-establishing-an-unprivileged-uid-mapping.patch
queue-3.18/mnt-implicitly-add-mnt_nodev-on-remount-when-it-was-implicitly-added-by-mount.patch
queue-3.18/userns-don-t-allow-unprivileged-creation-of-gid-mappings.patch
queue-3.18/userns-rename-id_map_mutex-to-userns_state_mutex.patch
queue-3.18/userns-add-a-knob-to-disable-setgroups-on-a-per-user-namespace-basis.patch
queue-3.18/userns-allow-setting-gid_maps-without-privilege-when-setgroups-is-disabled.patch
queue-3.18/userns-don-t-allow-setgroups-until-a-gid-mapping-has-been-setablished.patch
queue-3.18/groups-consolidate-the-setgroups-permission-checks.patch
queue-3.18/userns-only-allow-the-creator-of-the-userns-unprivileged-mappings.patch
queue-3.18/userns-document-what-the-invariant-required-for-safe-unprivileged-mappings.patch
queue-3.18/umount-disallow-unprivileged-mount-force.patch
queue-3.18/userns-unbreak-the-unprivileged-remount-tests.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html