mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: Add centralized descriptor range validation
Introduce a CheckedDescriptorIter adapter over DescriptorChain that validates each descriptor's translated (addr, len) range against guest memory before yielding it. Any descriptor whose buffer is not fully backed by guest RAM is rejected, so the device never performs I/O against memory the guest does not actually own. The helper lives in vm-virtio so it can be shared across the virtio-devices and block crates, both of which already depend on vm-virtio. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
e033b593d9
commit
4c6d60f162
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2692,6 +2692,7 @@ dependencies = [
|
||||
name = "vm-virtio"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"virtio-queue",
|
||||
"vm-memory",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user