From 8685eb5c5333dd4487457d582cd61080d4cedc8d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Sat, 18 Apr 2026 11:18:46 +0100 Subject: [PATCH] virtio-devices: pmem: 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/pmem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio-devices/src/pmem.rs b/virtio-devices/src/pmem.rs index 94f2716b6..9024bcfa2 100644 --- a/virtio-devices/src/pmem.rs +++ b/virtio-devices/src/pmem.rs @@ -115,7 +115,7 @@ impl Request { return Err(Error::UnexpectedWriteOnlyDescriptor); } - if desc.len() as usize != size_of::() { + if (desc.len() as usize) < size_of::() { return Err(Error::InvalidRequest); }