summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-02-06 11:22:09 +0100
committerChristian Brauner <brauner@kernel.org>2024-02-07 21:16:29 +0100
commit46f5ab762d048dad224436978315cbc2fa79c630 (patch)
tree82f716917c9c4c0374ef5571e36793f6553458a8 /Documentation
parent853b8d7597eea4ccaaefbcf0942cd42fc86d542a (diff)
fs: relax mount_setattr() permission checks
When we added mount_setattr() I added additional checks compared to the legacy do_reconfigure_mnt() and do_change_type() helpers used by regular mount(2). If that mount had a parent then verify that the caller and the mount namespace the mount is attached to match and if not make sure that it's an anonymous mount. The real rootfs falls into neither category. It is neither an anoymous mount because it is obviously attached to the initial mount namespace but it also obviously doesn't have a parent mount. So that means legacy mount(2) allows changing mount properties on the real rootfs but mount_setattr(2) blocks this. I never thought much about this but of course someone on this planet of earth changes properties on the real rootfs as can be seen in [1]. Since util-linux finally switched to the new mount api in 2.39 not so long ago it also relies on mount_setattr() and that surfaced this issue when Fedora 39 finally switched to it. Fix this. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2256843 Link: https://lore.kernel.org/r/20240206-vfs-mount-rootfs-v1-1-19b335eee133@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Reported-by: Karel Zak <kzak@redhat.com> Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions