From 82d426162d87bb2d9abd8588ad3fed11e2251a49 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Sat, 18 Apr 2026 11:18:46 +0100 Subject: [PATCH] virtio-devices: mem: Relax descriptor size check The virtio spec allows the use of larger descriptors (for future expansion). Relax the bounds check to only reject descriptors that are too small. Signed-off-by: Rob Bradford --- virtio-devices/src/mem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio-devices/src/mem.rs b/virtio-devices/src/mem.rs index 067100164..727fd72c0 100644 --- a/virtio-devices/src/mem.rs +++ b/virtio-devices/src/mem.rs @@ -293,7 +293,7 @@ impl Request { if desc.is_write_only() { return Err(Error::UnexpectedWriteOnlyDescriptor); } - if desc.len() as usize != size_of::() { + if (desc.len() as usize) < size_of::() { return Err(Error::InvalidRequest); } let req: VirtioMemReq = desc_chain