Files
erofs-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: [email protected]
Signed-off-by: Jann Horn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Acked-by: Miklos Szeredi <[email protected]>
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-05-22 15:19:26 +02:00
..
2026-04-02 20:43:24 +02:00
2026-04-02 20:43:24 +02:00
2026-04-02 20:52:59 +02:00
2026-04-03 16:53:50 -04:00
2026-04-02 20:43:24 +02:00