kernel_samsung_a53x/fs/fuse
Jann Horn 412262803e 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: a1d75f258230 ("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-11-23 23:20:42 +01:00
..
acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
control.c fuse: name fs_context consistently 2024-11-23 23:20:18 +01:00
cuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dax.c fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() 2024-11-18 12:11:50 +01:00
dev.c fuse: Initialize beyond-EOF page contents before setting uptodate 2024-11-23 23:20:42 +01:00
dir.c fuse: fix root lookup with nonzero generation 2024-11-19 09:22:18 +01:00
file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fuse_i.h fuse: don't unhash root 2024-11-19 09:22:18 +01:00
inode.c fuse: verify {g,u}id mount options correctly 2024-11-23 23:20:18 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
passthrough.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
readdir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_fs.c fuse: name fs_context consistently 2024-11-23 23:20:18 +01:00
xattr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00