GHSA-g23h-7vf9-xc25: Mimalloc Mimalloc Can Allocate Memory With Vulnerability
MODERATEGHSA-g23h-7vf9-xc25 is a MODERATE mimalloc can allocate memory with vulnerability (General Security Weakness) affecting Mimalloc libraries in the crates.io ecosystem. The issue involves mimalloc can allocate memory with bad alignment. Remediation is available by upgrading affected packages to version 0.1.39.
GHSA-g23h-7vf9-xc25 at a Glance
How to Fix GHSA-g23h-7vf9-xc25
To remediate this vulnerability, upgrade all affected Mimalloc 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 mimalloc to 0.1.39
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mimalloc
How to Check if You Are Affected
To determine whether your application is affected by GHSA-g23h-7vf9-xc25, inspect your project dependencies for Mimalloc:
inspect dependencies for mimalloc
Analyze the terminal output to locate any version of Mimalloc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.39), 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 General Security Weakness. In Mimalloc, 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
GHSA-g23h-7vf9-xc25 Affected Mimalloc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mimalloc
|
crates.io |
< 0.1.39
|
0.1.39
|
References
Frequently Asked Questions
What is GHSA-g23h-7vf9-xc25?
Which Mimalloc versions are affected?
What version fixes GHSA-g23h-7vf9-xc25?
Is mimalloc affected?
What CWE is associated with GHSA-g23h-7vf9-xc25?
How can I check crates.io dependencies for GHSA-g23h-7vf9-xc25?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g23h-7vf9-xc25",
"modified" : "2024-11-12T21:21:36Z",
"published" : "2024-11-12T21:21:36Z",
"aliases" : [ ],
"summary" : "Mimalloc Can Allocate Memory with Bad Alignment",
"details" : "This crate depended on a promise regarding alignments made by the author of the mimalloc allocator to avoid using aligned allocation functions where possible for performance reasons.\nSince then, the mimalloc allocator's logic changed, making it break this promise.\nThis caused this crate to return memory with an incorrect alignment for some allocations, particularly those with large alignments.\nThe flaw was fixed by always using the aligned allocation functions.\n",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "mimalloc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.39"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/purpleprotocol/mimalloc_rust/issues/87"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/purpleprotocol/mimalloc_rust"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2022-0094.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-12T21:21:36Z",
"nvd_published_at" : null
}
}