Commit 8577ded
fuse: prevent overflow in copy_file_range return value
commit 1e08938 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 <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Fixes: 88bc7d5 ("fuse: add support for copy_file_range()")
Cc: <[email protected]> # v4.20
Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 01e1eba commit 8577ded
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3106 | 3106 | | |
3107 | 3107 | | |
3108 | 3108 | | |
3109 | | - | |
| 3109 | + | |
3110 | 3110 | | |
3111 | 3111 | | |
3112 | 3112 | | |
| |||
0 commit comments