CVEfocus › CVE database › CVE-2023-41051

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

CVSS 2.5 LowEPSS 0.3% (higher than 16% of CVEs)Published 2023-09-01Updated 2025-02-13Assigner: GitHub_M

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.

CWE-125

What to do

Fixed builds are available from Debian, crates.io: see the table below for the fixed version per release.

Debian has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
1Fix pending
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10rust-vm-memoryNot affected
vulnerable_code_not_present
Ubuntu 24.04rust-vm-memoryNot affected
vulnerable_code_not_present
Debian 14rust-vm-memoryFixed0.12.2-1DEBIAN-CVE-2023-41051
Debian 13rust-vm-memoryFixed0.12.2-1DEBIAN-CVE-2023-41051
Debian 12rust-vm-memoryFix pendingDEBIAN-CVE-2023-41051
crates.io libraryvm-memoryFixed0.12.2GHSA-49hh-fprx-m68g

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.