OpenCloudOS-Kernel/fs/fuse
Jann Horn ac42e0f0eb fuse: Initialize beyond-EOF page contents before setting uptodate
commit 3c0da3d163eb32f1f91891efaade027fa9b245b9 upstream.

fuse_notify_store(), unlike fuse_do_readpage(), does not enable page
zeroing (because it can be used to change partial page contents).

So fuse_notify_store() must be more careful to fully initialize page
contents (including parts of the page that are beyond end-of-file)
before marking the page uptodate.

The current code can leave beyond-EOF page contents uninitialized, which
makes these uninitialized page contents visible to userspace via mmap().

This is an information leak, but only affects systems which do not
enable init-on-alloc (via CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y or the
corresponding kernel command line parameter).

Link: https://bugs.chromium.org/p/project-zero/issues/detail?id=2574
Cc: stable@kernel.org
Fixes: a1d75f2582 ("fuse: add store request")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:33:11 +02:00
..
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
acl.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
control.c fuse: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
cuse.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
dax.c fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() 2023-12-20 17:01:52 +01:00
dev.c fuse: Initialize beyond-EOF page contents before setting uptodate 2024-08-29 17:33:11 +02:00
dir.c fuse: fix leaked ENOSYS error on first statx call 2024-04-27 17:11:42 +02:00
file.c fuse: fix VM_MAYSHARE and direct_io_allow_mmap 2024-04-03 15:28:20 +02:00
fuse_i.h fuse: don't unhash root 2024-04-03 15:28:25 +02:00
inode.c fuse: verify {g,u}id mount options correctly 2024-08-03 08:54:14 +02:00
ioctl.c fuse: ioctl: translate ENOSYS in outarg 2023-06-21 11:17:36 +02:00
readdir.c fuse: cache btime 2023-08-21 12:14:59 +02:00
virtio_fs.c dax: enable dax fault handler to report VM_FAULT_HWPOISON 2023-06-26 07:54:23 -06:00
xattr.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00