milos-linux/fs/fuse
Miklos Szeredi e09412a714 virtiofs: fix UAF on submount umount
commit 06b41351779e9289e8785694ade9042ae85e41ea upstream.

iput() called from fuse_release_end() can Oops if the super block has
already been destroyed.  Normally this is prevented by waiting for
num_waiting to go down to zero before commencing with super block shutdown.

This only works, however, for the last submount instance, as the wait
counter is per connection, not per superblock.

Revert to using synchronous release requests for the auto_submounts case,
which is virtiofs only at this time.

Reported-by: Aurélien Bombo <abombo@microsoft.com>
Reported-by: Zhihao Cheng <chengzhihao1@huawei.com>
Cc: Greg Kurz <gkurz@redhat.com>
Closes: https://github.com/kata-containers/kata-containers/issues/12589
Fixes: 26e5c67deb ("fuse: fix livelock in synchronous file put from fuseblk workers")
Cc: stable@vger.kernel.org
Reviewed-by: Greg Kurz <gkurz@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-06-27 11:08:18 +01:00
..
acl.c posix_acl: make posix_acl_to_xattr() alloc the buffer 2026-01-16 10:51:12 +01:00
backing.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
control.c fuse: quiet down complaints in fuse_conn_limit_write 2026-03-03 10:05:39 +01:00
cuse.c fuse: add refcount to fuse_dev 2026-04-02 20:43:24 +02:00
dax.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dev.c fuse: re-lock request before replacing page cache folio 2026-06-27 11:08:17 +01:00
dev_uring.c fuse: refactor duplicate queue teardown operation 2026-02-27 15:16:34 +01:00
dev_uring_i.h
dir.c fuse: fix uninit-value in fuse_dentry_revalidate() 2026-03-03 17:43:34 +01:00
file.c virtiofs: fix UAF on submount umount 2026-06-27 11:08:18 +01:00
fuse_dev_i.h fuse: add refcount to fuse_dev 2026-04-02 20:43:24 +02:00
fuse_i.h fuse: clean up device cloning 2026-04-02 20:52:59 +02:00
fuse_trace.h
inode.c fuse update for 7.1 2026-04-15 19:04:21 -07:00
ioctl.c Revert "fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP" 2025-10-10 13:44:03 +02:00
iomode.c fuse: remove unused 'inode' parameter in fuse_passthrough_open 2025-08-27 14:29:44 +02:00
Kconfig fuse: fix references to fuse.rst -> fuse/fuse.rst 2025-09-02 11:14:15 +02:00
Makefile fuse: move CREATE_TRACE_POINTS to a separate file 2025-09-25 16:22:18 +02:00
passthrough.c lsm: add backing_file LSM hooks 2026-04-03 16:53:50 -04:00
readdir.c vfs-7.1-rc1.fixes 2026-04-23 17:08:04 -07:00
sysctl.c
trace.c fuse: move CREATE_TRACE_POINTS to a separate file 2025-09-25 16:22:18 +02:00
virtio_fs.c fuse: add refcount to fuse_dev 2026-04-02 20:43:24 +02:00
xattr.c