fs/9p: only translate RWX permissions for plain 9P2000
authorJoakim Sindholt <opensource@zhasha.com>
Mon, 18 Mar 2024 11:22:31 +0000 (12:22 +0100)
committerEric Van Hensbergen <ericvh@kernel.org>
Thu, 28 Mar 2024 13:59:23 +0000 (13:59 +0000)
commitcd25e15e57e68a6b18dc9323047fe9c68b99290b
tree53784baf6b0f0f48e9835586426e37a89f4a761c
parent8d025e2092e29bfd13e56c78e22af25fac83c8ec
fs/9p: only translate RWX permissions for plain 9P2000

Garbage in plain 9P2000's perm bits is allowed through, which causes it
to be able to set (among others) the suid bit. This was presumably not
the intent since the unix extended bits are handled explicitly and
conditionally on .u.

Signed-off-by: Joakim Sindholt <opensource@zhasha.com>
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
fs/9p/vfs_inode.c