mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
VhdxSync::submit_data_operation() passed every read/write straight to the underlying Vhdx without checking the request against the virtual disk's logical size. A request that started inside the image but extended past its end (or an offset past the end entirely) was passed through unchecked, silently reading/writing out of the intended bounds. Call AsyncIoOperation::validate_bounds() from submit_data_operation() before dispatching the operation, the same way the VHD sync worker does. The check rejects any request whose offset + length exceeds the logical size. Signed-off-by: Alexander Lvov <alexander.lvov.git@gmail.com>