]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
do_change_type(): refuse to operate on unmounted/not ours mounts
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Jun 2025 16:27:08 +0000 (12:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:18 +0000 (11:07 +0100)
commit064014f7812744451d5d0592f3d2bcd727f2ee93
treeb7c2f3ba89fbb8af9b8b8561f2963f4680e55656
parent95d4baf44180d257d23409649696a6b463d6f50b
do_change_type(): refuse to operate on unmounted/not ours mounts

[ Upstream commit 12f147ddd6de7382dad54812e65f3f08d05809fc ]

Ensure that propagation settings can only be changed for mounts located
in the caller's mount namespace. This change aligns permission checking
with the rest of mount(2).

Reviewed-by: Christian Brauner <brauner@kernel.org>
Fixes: 07b20889e305 ("beginning of the shared-subtree proper")
Reported-by: "Orlando, Noah" <Noah.Orlando@deshaw.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/namespace.c