]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fuse: limit FUSE_NOTIFY_RETRIEVE to uptodate folios
authorJann Horn <jannh@google.com>
Tue, 19 May 2026 14:40:34 +0000 (16:40 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 22 May 2026 13:19:26 +0000 (15:19 +0200)
commit4e3d1b2c48ca6c55f1e9ca7f8dccc76f120f276c
tree8fb6f260bf0ba5b85aa98f47ac59d689587a8469
parent0eb307d61317b42b120ab02099b597226318358a
fuse: limit FUSE_NOTIFY_RETRIEVE to uptodate folios

FUSE_NOTIFY_RETRIEVE must be limited to uptodate folios; !uptodate folios
can contain uninitialized data.
Since FUSE_NOTIFY_RETRIEVE is intended to only return data that is already
in the page cache and not wait for data from the FUSE daemon, treat
!uptodate folios as if they weren't present.

This only has security impact on systems that don't enable automatic
zero-initialization of all page allocations via
CONFIG_INIT_ON_ALLOC_DEFAULT_ON or init_on_alloc=1.

Cc: stable@kernel.org
Fixes: 2d45ba381a74 ("fuse: add retrieve request")
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://patch.msgid.link/20260519-fuse-retrieve-uptodate-v1-1-a7a1912a37f9@google.com
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/fuse/dev.c