diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-30 15:32:03 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-10-01 14:20:07 +0200 |
| commit | d791606bb915a8f27e36657696fd1d9a216c5c08 (patch) | |
| tree | ff74132b61d7bfcc0b158912c329bb2d7634c15d /scripts/Makefile.thinlto | |
| parent | 6b7c001eb5857fa09041f47673666060a2e5fc1c (diff) | |
| download | linux-next-d791606bb915a8f27e36657696fd1d9a216c5c08.tar.gz linux-next-d791606bb915a8f27e36657696fd1d9a216c5c08.zip | |
namespace: don't reconfigure internal superblocks via remount and umount
Commit 02587a4af82a ("fs: refuse fspick() on internal superblocks")
blocked fspick() on SB_NOUSER superblocks. But that's not the only way
to reconfigure_super(). mount(MS_REMOUNT) and umount() of the caller's
root without MNT_DETACH. The root of an empty mount namespace is a
nullfs mount and all mount namespaces share that superblock:
nullfs: fspick: FAIL errno=22 (Invalid argument)
nullfs: mount(MS_REMOUNT|MS_RDONLY): ok(0)
nullfs after remount: statfs(/): magic=0x4e554c4c flags=0x21 RDONLY
nullfs: umount2("/", 0): ok(0)
Refuse both like fspick() does. Only root in the initial user namespace
can do this and nullfs is empty and immutable so the flags don't buy
anything. But they show up in statfs() for the root of every mount
namespace on the host.
Fixes: 9d4e752a24f7 ("namespace: allow creating empty mount namespaces")
Cc: stable@vger.kernel.org # v7.1+
Link: https://patch.msgid.link/20260930-work-mount-fixes-3-v1-11-be34c83956ae@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
