kernel_samsung_a53x/fs/fuse
Eric Sandeen 5cf79899db fuse: verify {g,u}id mount options correctly
[ Upstream commit 525bd65aa759ec320af1dc06e114ed69733e9e23 ]

As was done in
0200679fc795 ("tmpfs: verify {g,u}id mount options correctly")
we need to validate that the requested uid and/or gid is representable in
the filesystem's idmapping.

Cribbing from the above commit log,

The contract for {g,u}id mount options and {g,u}id values in general set
from userspace has always been that they are translated according to the
caller's idmapping. In so far, fuse has been doing the correct thing.
But since fuse is mountable in unprivileged contexts it is also
necessary to verify that the resulting {k,g}uid is representable in the
namespace of the superblock.

Fixes: c30da2e981a7 ("fuse: convert to use the new mount API")
Cc: stable@vger.kernel.org # 5.4+
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Link: https://lore.kernel.org/r/8f07d45d-c806-484d-a2e3-7a2199df1cd2@redhat.com
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:18 +01:00
..
acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
control.c fuse: name fs_context consistently 2024-11-23 23:20:18 +01:00
cuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dax.c fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() 2024-11-18 12:11:50 +01:00
dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dir.c fuse: fix root lookup with nonzero generation 2024-11-19 09:22:18 +01:00
file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fuse_i.h fuse: don't unhash root 2024-11-19 09:22:18 +01:00
inode.c fuse: verify {g,u}id mount options correctly 2024-11-23 23:20:18 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
passthrough.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
readdir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_fs.c fuse: name fs_context consistently 2024-11-23 23:20:18 +01:00
xattr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00