CVE-2023-41051: Vm memory Default Functions Vulnerability
LOWCVE-2023-41051 is a LOW (CVSS 2.5) default functions vulnerability (CWE-125: Out-of-bounds Read) affecting Vm memory libraries in the crates.io ecosystem. The issue involves default functions in volatilememory trait lack bounds checks, potentially leading to out-of-bounds memory accesses. Remediation is available by upgrading affected packages to version 0.12.2.
CVE-2023-41051 at a Glance
Security Impact
CVSS: 2.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L).
How to Fix CVE-2023-41051
To remediate this vulnerability, upgrade all affected Vm memory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade vm-memory to 0.12.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for vm-memory
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-41051, inspect your project dependencies for Vm memory:
inspect dependencies for vm-memory
Analyze the terminal output to locate any version of Vm memory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Vm memory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-41051 Affected Vm memory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vm-memory
|
crates.io |
< 0.12.2
|
0.12.2
|
References
Frequently Asked Questions
What is CVE-2023-41051?
Which Vm memory versions are affected?
What version fixes CVE-2023-41051?
Is vm-memory affected?
What is the CVSS score of CVE-2023-41051?
What CWE is associated with CVE-2023-41051?
How can I check crates.io dependencies for CVE-2023-41051?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-49hh-fprx-m68g",
"modified" : "2025-02-13T19:11:48Z",
"published" : "2023-09-04T16:35:37Z",
"aliases" : [ "CVE-2023-41051" ],
"summary" : "Default functions in VolatileMemory trait lack bounds checks, potentially leading to out-of-bounds memory accesses",
"details" : "### Impact\nAn 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.\n\n### Patches\nThe 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.\n\n### Workarounds\nNot Required\n\n### References\nhttps://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8\nhttps://crates.io/crates/vm-memory/0.12.2",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "vm-memory"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-vmm/vm-memory/security/advisories/GHSA-49hh-fprx-m68g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41051"
}, {
"type" : "WEB",
"url" : "https://github.com/rust-vmm/vm-memory/issues/250"
}, {
"type" : "WEB",
"url" : "https://github.com/rust-vmm/vm-memory/commit/aff1dd4a5259f7deba56692840f7a2d9ca34c9c8"
}, {
"type" : "WEB",
"url" : "https://crates.io/crates/vm-memory/0.12.2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rust-vmm/vm-memory"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IPXRXD5VXBZHBGMUM77B52CJJMG7EJGI"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SYM6CYW2DWRHRAVL2HYTQPXC3J2V77J4"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XZGJL6BQLU4XCPQLLTW4GSSBTNQXB3TI"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0056.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-04T16:35:37Z",
"nvd_published_at" : "2023-09-01T19:15:42Z"
}
}