CVE-2023-41051 Default functions in VolatileMemory trait lack bounds checks in vm-memory
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- https://github.com/rust-vmm/vm-memory/security/advisories/GHSA-49hh-fprx-m68g issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com issue-tracking
- https://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8 issue-tracking patch
- https://crates.io/crates/vm-memory/0.12.2 issue-tracking product
- github.com product
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- rustsec.org issue-tracking vendor-advisory
- crates.io product
- github.com
- Debian Security Tracker CVE-2023-41051 vendor-advisory
- bugs.debian.org issue-tracking
- ubuntu.com issue-tracking
- www.cve.org issue-tracking