Default functions in VolatileMemory trait lack bounds checks in vm-memory
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-125 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust-vmm | vm-memory | 0.1.0 to before 0.12.2 | 0.12.2 | Patch available | CNA |
| — | vm-memory (crates.io) | before 0.12.2 | 0.12.2 | Patch available | GHSA-49hh-fprx-m68g |
- vm-memory Vendorrust-vmm Affected 0.1.0 to before 0.12.2 Fixed in 0.12.2 Patch available CNA
- vm-memory (crates.io) Vendor— Affected before 0.12.2 Fixed in 0.12.2 Patch available GHSA-49hh-fprx-m68g
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:vm-memory_project:vm-memory:*:*:*:*:*:rust:*:* | 0.1.0 to before 0.12.2 | Vulnerable | Vm-memory Project |
- cpe:2.3:a:vm-memory_project:vm-memory:*:*:*:*:*:rust:*:* Versions 0.1.0 to before 0.12.2 Vulnerable ·Vm-memory Project
Remediation
- Fix · CNA vm-memory (rust-vmm) Fixed in 0.12.2
- Fix · GHSA-49hh-fprx-m68g vm-memory (crates.io) Fixed in 0.12.2 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2023-41051
- 2026-10-03 Alias added: GHSA-49hh-fprx-m68g
References
Advisory 2
Other 10
- https://crates.io/crates/vm-memory/0.12.2
- https://lists.fedoraproject.org/archives/list/[email protected]/message/XZGJL6BQLU4XCPQLLTW4GSSBTNQXB3TI/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/IPXRXD5VXBZHBGMUM77B52CJJMG7EJGI/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SYM6CYW2DWRHRAVL2HYTQPXC3J2V77J4/
- https://github.com/rust-vmm/vm-memory/issues/250
- https://github.com/rust-vmm/vm-memory
- https://lists.fedoraproject.org/archives/list/[email protected]/message/IPXRXD5VXBZHBGMUM77B52CJJMG7EJGI
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SYM6CYW2DWRHRAVL2HYTQPXC3J2V77J4
- https://lists.fedoraproject.org/archives/list/[email protected]/message/XZGJL6BQLU4XCPQLLTW4GSSBTNQXB3TI
- https://rustsec.org/advisories/RUSTSEC-2023-0056.html
More rust-vmm vulnerabilities
- TI-2023-27657 Out-of-bounds write in rust-vmm vmm-sys-util CVSS 3.1CRITICAL 9.8
- TI-2022-07582 rust-vmm linux-loader vulnerable to Out-of-bounds Read CVSS 3.1MEDIUM 5.5
Sources
- CVE-2023-41051 · CVE Program
- CVE-2023-41051 · NVD
- FIRST EPSS
- GHSA-49hh-fprx-m68g · GitHub Advisory Database · CC BY 4.0
- CVE-2023-41051 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences