]> git.ipfire.org Git - people/arne_f/kernel.git/commit
Don't leak MNT_INTERNAL away from internal mounts
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 20 Apr 2018 02:03:08 +0000 (22:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:43:10 +0000 (09:43 +0200)
commitf27f9d4eb535521d42694b00d3e7f5a70956eb29
tree7f575688b3d1cf1e34ef759f205be8b81125c4f1
parent68a8025a3b5558c9b1603fb6da130dad294696ce
Don't leak MNT_INTERNAL away from internal mounts

commit 16a34adb9392b2fe4195267475ab5b472e55292c upstream.

We want it only for the stuff created by SB_KERNMOUNT mounts, *not* for
their copies.  As it is, creating a deep stack of bindings of /proc/*/ns/*
somewhere in a new namespace and exiting yields a stack overflow.

Cc: stable@kernel.org
Reported-by: Alexander Aring <aring@mojatatu.com>
Bisected-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Tested-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Tested-by: Alexander Aring <aring@mojatatu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namespace.c