Skip to content

CVE-2023-41051 Default functions in VolatileMemory trait lack bounds checks in vm-memory

MediumCVSS 4.7 EPSS 0.26%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebian

Description

In a typical Virtual Machine Monitor (VMM) there are several components, such as boot loader, virtual device drivers, virtio backend drivers and vhost drivers, that need to access the VM physical memory. The vm-memory rust crate provides a set of traits to decouple VM memory consumers from VM memory providers. An issue was discovered in the default implementations of the VolatileMemory::{get_atomic_ref, aligned_as_ref, aligned_as_mut, get_ref, get_array_ref} trait functions, which allows out-of-bounds memory access if the VolatileMemory::get_slice function returns a VolatileSlice whose length is less than the function’s count argument. No implementations of get_slice provided in vm_memory are affected. Users of custom VolatileMemory implementations may be impacted if the custom implementation does not adhere to get_slice's documentation. The issue started in version 0.1.0 but was fixed in version 0.12.2 by inserting a check that verifies that the VolatileSlice returned by get_slice is of the correct length. Users are advised to upgrade. There are no known workarounds for this issue.

Upgrade path

7 packages: 4 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
debian/rust-vm-memory(Debian 12) = 0.10.0-3; = 0.12.0-1; = 0.12.0-2; = 0.12.2-1 +8 more No fix listed No fix yet
ubuntu/rust-vm-memory(Ubuntu 24.04) = 0.12.0-2; = 0.12.2-1; = 0.14.0-1; All versions No fix listed No fix yet
crates.io vm-memory(crates.io) < 0.12.2; >= 0.0.0-0, < 0.12.2 0.12.2 Fixed
debian/rust-vm-memory(Debian 13) < 0.12.2-1 0.12.2-1 Fixed
debian/rust-vm-memory(Debian 14) < 0.12.2-1 0.12.2-1 Fixed
vm-memory project vm-memory >= 0.1.0, < 0.12.2 0.12.2 Fixed
rust-vmm vm-memory = >= 0.1.0, < 0.12.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
crates.io vm-memory(crates.io) < 0.12.2 0.12.2
crates.io vm-memory(crates.io) >= 0.0.0-0, < 0.12.2 0.12.2
debian/rust-vm-memory(Debian:12) All versions No fix listed
debian/rust-vm-memory(Debian:12) = 0.10.0-3 No fix listed
debian/rust-vm-memory(Debian:12) = 0.12.0-1 No fix listed
debian/rust-vm-memory(Debian:12) = 0.12.0-2 No fix listed
debian/rust-vm-memory(Debian:12) = 0.12.2-1 No fix listed
debian/rust-vm-memory(Debian:12) = 0.14.0-1 No fix listed
debian/rust-vm-memory(Debian:12) = 0.16.1-1 No fix listed
debian/rust-vm-memory(Debian:12) = 0.16.1-2 No fix listed
debian/rust-vm-memory(Debian:12) = 0.16.1-3 No fix listed
debian/rust-vm-memory(Debian:12) = 0.16.1-4 No fix listed
debian/rust-vm-memory(Debian:12) = 0.16.2-1 No fix listed
debian/rust-vm-memory(Debian:12) = 0.18.0-1 No fix listed
debian/rust-vm-memory(Debian:13) < 0.12.2-1 0.12.2-1
debian/rust-vm-memory(Debian:14) < 0.12.2-1 0.12.2-1
rust-vmm vm-memory = >= 0.1.0, < 0.12.2 No fix listed
vm-memory project vm-memory >= 0.1.0, < 0.12.2 0.12.2
ubuntu/rust-vm-memory(Ubuntu:24.04) All versions No fix listed
ubuntu/rust-vm-memory(Ubuntu:24.04) = 0.12.0-2 No fix listed
ubuntu/rust-vm-memory(Ubuntu:24.04) = 0.12.2-1 No fix listed
ubuntu/rust-vm-memory(Ubuntu:24.04) = 0.14.0-1 No fix listed

References