linux-yocto/fs/fuse
Miklos Szeredi 532b87643f fuse: prevent overflow in copy_file_range return value
commit 1e08938c3694f707bb165535df352ac97a8c75c9 upstream.

The FUSE protocol uses struct fuse_write_out to convey the return value of
copy_file_range, which is restricted to uint32_t.  But the COPY_FILE_RANGE
interface supports a 64-bit size copies.

Currently the number of bytes copied is silently truncated to 32-bit, which
may result in poor performance or even failure to copy in case of
truncation to zero.

Reported-by: Florian Weimer <fweimer@redhat.com>
Closes: https://lore.kernel.org/all/lhuh5ynl8z5.fsf@oldenburg.str.redhat.com/
Fixes: 88bc7d5097 ("fuse: add support for copy_file_range()")
Cc: <stable@vger.kernel.org> # v4.20
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-19 16:35:46 +02:00
..
acl.c fuse: support idmapped ->set_acl 2024-09-04 16:51:11 +02:00
control.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
cuse.c
dax.c fuse: fix dax truncate/punch_hole fault path 2025-04-10 14:39:25 +02:00
dev.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
dir.c fuse: fix race between concurrent setattrs from multiple nodes 2025-07-06 11:01:32 +02:00
file.c fuse: prevent overflow in copy_file_range return value 2025-09-19 16:35:46 +02:00
fuse_i.h virtiofs: use pages instead of pointer for kernel direct IO 2024-12-05 14:02:21 +01:00
fuse_trace.h fuse: add simple request tracepoints 2024-08-29 11:43:13 +02:00
inode.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
ioctl.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
iomode.c
Kconfig
Makefile fuse: add simple request tracepoints 2024-08-29 11:43:13 +02:00
passthrough.c fuse: do not allow mapping a non-regular backing file 2025-09-19 16:35:46 +02:00
readdir.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
virtio_fs.c virtiofs: add filesystem context source name check 2025-04-25 10:47:55 +02:00
xattr.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00