CVE-2023-41051
What it is
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.
At a glance
- Exploitability
- Can be exploited locally on the machine without logging in, but needs a user to act. Limited direct impact.
- Exploit odds
- 0.3% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.3% in the next 30 days (EPSS).
- Severity: 2.5 LOW (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.3% · EPSS, next 30 days
- Weakness
- CWE-125 · Out-of-bounds read
- Record status
- Modified
Affected
- vm-memory Project vm-memory < 0.12.2
Attack profile CVSS 3.1 · 2.5
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Raw vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2023-41051.md and follow it. Check whether this project is affected by CVE-2023-41051. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8
- https://github.com/rust-vmm/vm-memory/security/advisories/GHSA-49hh-fprx-m68g
- https://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8
- https://github.com/rust-vmm/vm-memory/security/advisories/GHSA-49hh-fprx-m68g
References
- https://crates.io/crates/vm-memory/0.12.2
- https://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8
- https://github.com/rust-vmm/vm-memory/security/advisories/GHSA-49hh-fprx-m68g
- 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://crates.io/crates/vm-memory/0.12.2
- https://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8
- https://github.com/rust-vmm/vm-memory/security/advisories/GHSA-49hh-fprx-m68g
- 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/