GHSA-wm8x-php5-hvq6: Maligned Maligned Causes Incorrect Deallocation Vulnerability
MODERATEGHSA-wm8x-php5-hvq6 is a MODERATE maligned causes incorrect deallocation vulnerability (General Security Weakness) affecting Maligned libraries in the crates.io ecosystem. The issue involves maligned causes incorrect deallocation. Remediation is available in the latest vendor maintenance releases.
GHSA-wm8x-php5-hvq6 at a Glance
How to Fix GHSA-wm8x-php5-hvq6
To remediate this vulnerability, upgrade all affected Maligned 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 maligned to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for maligned
How to Check if You Are Affected
To determine whether your application is affected by GHSA-wm8x-php5-hvq6, inspect your project dependencies for Maligned:
inspect dependencies for maligned
Analyze the terminal output to locate any version of Maligned in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 Maligned, 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-wm8x-php5-hvq6 Affected Maligned Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
maligned
|
crates.io |
≤ 0.2.1
|
|
References
Frequently Asked Questions
What is GHSA-wm8x-php5-hvq6?
Which Maligned versions are affected?
What version fixes GHSA-wm8x-php5-hvq6?
Is maligned affected?
What CWE is associated with GHSA-wm8x-php5-hvq6?
How can I check crates.io dependencies for GHSA-wm8x-php5-hvq6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wm8x-php5-hvq6",
"modified" : "2023-03-07T20:13:19Z",
"published" : "2023-03-07T20:13:19Z",
"aliases" : [ ],
"summary" : "Maligned causes incorrect deallocation",
"details" : "`maligned::align_first` manually allocates with an alignment larger than T, and then uses `Vec::from_raw_parts` on that allocation to get a `Vec<T>`.\n\n[`GlobalAlloc::dealloc`](https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.dealloc) requires that the `layout` argument must be the same layout that was used to allocate that block of memory.\n\nWhen deallocating, `Box` and `Vec` may not respect the specified alignment and can cause undefined behavior.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "maligned"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tylerhawkes/maligned/issues/5"
}, {
"type" : "WEB",
"url" : "https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.dealloc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tylerhawkes/maligned"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0017.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-07T20:13:19Z",
"nvd_published_at" : null
}
}