linux/fs/fuse
Joanne Koong 5630da218a fuse: re-lock request before returning from fuse_ref_folio()
commit b5befa80fd upstream.

fuse_ref_folio() unlocks the request but does not re-lock it before
returning. fuse_chan_abort() can end the request and the async end
callback (eg fuse_writepage_free()) can free the args while the
subsequent copy chain logic after fuse_ref_folio() accesses them,
leading to use-after-free issues.

Fix this by locking the request in fuse_ref_folio() before returning.

Fixes: c3021629a0 ("fuse: support splice() reading from fuse device")
Cc: stable@vger.kernel.org
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-07-24 15:51:26 +02:00
..
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
control.c fuse: quiet down complaints in fuse_conn_limit_write 2026-06-01 17:35:12 +02:00
cuse.c fuse: fix device node leak in cuse_process_init_reply() 2026-07-24 15:51:26 +02:00
dax.c fuse: fix dax truncate/punch_hole fault path 2025-04-10 14:32:02 +02:00
dev.c fuse: re-lock request before returning from fuse_ref_folio() 2026-07-24 15:51:26 +02:00
dir.c fuse: allocate ff->release_args only if release is needed 2025-10-29 14:03:14 +01:00
file.c virtiofs: fix UAF on submount umount 2026-07-04 13:39:37 +02:00
fuse_i.h fuse: allocate ff->release_args only if release is needed 2025-10-29 14:03:14 +01:00
inode.c fuse: fix UAF in rcu pathwalks 2024-09-04 13:23:23 +02:00
ioctl.c use less confusing names for iov_iter direction initializers 2026-06-19 13:33:46 +02:00
Kconfig virtiofs: implement dax read/write operations 2020-09-10 11:39:23 +02:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
readdir.c fuse: reject oversized dirents in page cache 2026-06-01 17:35:12 +02:00
virtio_fs.c virtiofs: add filesystem context source name check 2025-05-02 07:44:14 +02:00
xattr.c fuse: use unsigned type for getxattr/listxattr size truncation 2024-09-12 11:07:44 +02:00