ceph: fix up non-directory creation in SGID directories
Ceph always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem (cf. [1]). Update ceph to strip the SGID bit just as inode_init_owner would. This bug was detected by the mapped mount testsuite in [3]. The testsuite tests all core VFS functionality and semantics with and without mapped mounts. That is to say it functions as a generic VFS testsuite in addition to a mapped mount testsuite. While working on mapped mount support for ceph, SIGD inheritance was the only failing test for ceph after the port. The same bug was detected by the mapped mount testsuite in XFS in January 2021 (cf. [2]). [1]: commit 0fa3ecd8 ("Fix up non-directory creation in SGID directories") [2]: commit 01ea173e ("xfs: fix up non-directory creation in SGID directories") [3]: https://git.kernel.org/fs/xfs/xfstests-dev.git Cc: stable@vger.kernel.org Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com> Reviewed-by:
Jeff Layton <jlayton@kernel.org> Signed-off-by:
Ilya Dryomov <idryomov@gmail.com>
Loading
-
mentioned in commit 838f5d07
-
mentioned in commit 1c5699ee
-
mentioned in commit 1c5699ee
-
mentioned in commit 838f5d07
-
mentioned in commit 838f5d07
-
mentioned in commit 1c5699ee
-
mentioned in commit 838f5d07
-
mentioned in commit 1c5699ee
-
mentioned in commit 347750e1
-
mentioned in commit 94ac142c
Please register or sign in to comment