cloud-hypervisor/vm-virtio
Rob Bradford 1eb4ebe3d1 vm-virtio: queue: Fix descriptor chain validation
DescriptorChain::is_valid() wrongly used .checked_offset() to attempt to
validate that the descriptor's data is in valid memory. This works in
all cases except where the guest has placed the data at the very end of
the guest memory as the offset + offset will be outside the range (as
the combined offset will be the next byte and as such out of the guest
memory). Instead use the function .check_range() takes an offset and a
length to validate

This fixes issues see with error messages featuring the
DescriptorChainTooShort error.

Fixes: #2424

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-03-29 16:37:27 +01:00
..
src vm-virtio: queue: Fix descriptor chain validation 2021-03-29 16:37:27 +01:00
Cargo.toml build(deps): bump vm-memory from 0.4.0 to 0.5.0 2021-02-10 11:30:05 +00:00