Re: [PATCH v2] fuse: reject fuse_notify() pagecache ops on directories

From: Miklos Szeredi

Date: Tue May 19 2026 - 10:35:04 EST


On Tue, 19 May 2026 at 16:29, Jann Horn <jannh@xxxxxxxxxx> wrote:
>
> 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: 5d7bc7e8680c ("fuse: allow using readdir cache")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>

Acked-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>

Christian, can you please apply this to vfs.fixes?

Thanks,
Miklos