linux/fs/fuse
Jann Horn 9c954499d4
fuse: reject fuse_notify() pagecache ops on directories
The operations FUSE_NOTIFY_STORE and FUSE_NOTIFY_RETRIEVE allow the
FUSE daemon to actively write/read pagecache contents.

For directories with FOPEN_CACHE_DIR, the pagecache is used as
kernel-internal cache storage, and userspace is not supposed to have
direct access to this cache - in particular, fuse_parse_cache() will hit
WARN_ON() if the cache contains bogus data.

Reject FUSE_NOTIFY_STORE and FUSE_NOTIFY_RETRIEVE on anything other than
regular files with -EINVAL.

Fixes: 5d7bc7e868 ("fuse: allow using readdir cache")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://patch.msgid.link/20260519-fuse-dir-pagecache-v2-1-5428fa48e175@google.com
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-05-22 15:19:26 +02: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_uring_i.h fuse: add kernel-enforced timeout option for requests 2025-03-31 14:59:25 +02:00
dev_uring.c fuse: refactor duplicate queue teardown operation 2026-02-27 15:16:34 +01:00
dev.c fuse: reject fuse_notify() pagecache ops on directories 2026-05-22 15:19:26 +02:00
dir.c fuse: fix uninit-value in fuse_dentry_revalidate() 2026-03-03 17:43:34 +01:00
file.c fuse: fix writeback array overflow when max_pages is one 2026-05-11 14:19:01 +02: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 fuse: add simple request tracepoints 2024-08-29 11:43:13 +02:00
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 fuse: add default_request_timeout and max_request_timeout sysctls 2025-03-31 14:59:27 +02:00
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 fuse: make args->in_args[0] to be always the header 2025-01-24 11:54:02 +01:00