]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
UBUNTU: SAUCE: fs: Move SB_I_NOSUID to the top of s_iflags
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 6 Nov 2019 15:02:19 +0000 (09:02 -0600)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Feb 2021 07:25:47 +0000 (08:25 +0100)
commita874a2638b45902f1b43849f084cf70877d7a58d
treeb16dfa5cdd28264acac7ad7d4c7aa599649d21b1
parentb5250ec62f72950ca9a4d3149fe689495e586124
UBUNTU: SAUCE: fs: Move SB_I_NOSUID to the top of s_iflags

BugLink: https://bugs.launchpad.net/bugs/1851677
SB_I_NOSUID was added by a sauce patch, and over time it has come
to occpy the same bit in s_iflags as SB_I_USERNS_VISIBLE without
being noticed. overlayfs will set SB_I_NOSUID when any lower
mount is nosuid. When this happens for a user namespace mount,
mount_too_revealing() will perform additional, unnecessary checks
which may block mounting when it should be allowed.

Move SB_I_NOSUID to prevent this conflict, and move it to the top
of s_iflags to make future conflicts less likely.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
include/linux/fs.h