mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
The sync I/O worker only checked that the operation offset did not start past the end of the virtual disk (offset >= size) - did not verify that the operation end (offset + len) stays within bounds. A read or write that started inside the image but extended beyond the logical size was silently passed to the raw backend. The async io_uring worker already had the correct check (offset + len > size with overflow protection). I extracted it into a shared helper in worker/common.rs and reused inside the sync path to eliminate duplication and close the gap. Fixes #8311 Signed-off-by: Alexander Lvov <alexander.lvov.git@gmail.com>