Repository navigation
Commit 09ae84e
openvmm: pin the bound on FUSE write and copy counts
OpenVMM's FUSE session converted the byte count that a file system
returns for a write or a copy into the u32 of the reply with
try_into().unwrap() (microsoft#1631), so a file system that
reported more than u32::MAX bytes panicked, which aborts the VMM. A
guest can drive a copy's count that far, since FUSE_COPY_FILE_RANGE
carries a 64-bit length. Of the file systems that NVX runs, VirtioFs
refuses writes of more than 1 MiB and implements no copy, and
SectionFs and the dormant microVM file system implement neither
request, so NVX's guests never reached the panic.
Pin microsoft/openvmm 51e9af75dc7d4a3a9bd40ae52c996a822d3311cf, one
commit on feature/microvm/dev 3eb7500fd:
- fuse: reply EIO when a write or copy count overflows u32.
Session::write_out builds both replies, and fails the request with
EIO and a rate-limited error when the count does not fit, and
Fuse::write and Fuse::copy_file_range document the bound. Its tests
pass with the fix; without it, the two overflow tests panic with
"TryFromIntError(PosOverflow)", on Windows and on Linux
(nvx-mshv-test).
No saved state, protocol, ABI, or format, and no version of any of
them, changes. The protocol vectors and CPU profiles that nvx copies
are unchanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b5689cc commit 09ae84e
1 file changed
Lines changed: 1 addition & 1 deletion
0 commit comments