GHSA-r45x-ghr2-qjxc: Duplicate Advisory `#[zeroize(drop)]` Doesn't Implement `Drop` For Vulnerability
HIGHGHSA-r45x-ghr2-qjxc is a HIGH (CVSS 7.5) `#[zeroize(drop)]` doesn't implement `drop` for vulnerability (CWE-226: Sensitive Information in Resource Not Removed Before Reuse) affecting Duplicate Advisory libraries in the crates.io ecosystem. The issue involves `#[zeroize(drop)]` doesn't implement `drop` for `enum`s. Remediation is available by upgrading affected packages to version 1.1.1.
GHSA-r45x-ghr2-qjxc at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-r45x-ghr2-qjxc
To remediate this vulnerability, upgrade all affected Duplicate Advisory 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 zeroize_derive to 1.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for zeroize_derive
How to Check if You Are Affected
To determine whether your application is affected by GHSA-r45x-ghr2-qjxc, inspect your project dependencies for Duplicate Advisory:
inspect dependencies for zeroize_derive
Analyze the terminal output to locate any version of Duplicate Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.1), 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-226: Sensitive Information in Resource Not Removed Before Reuse, where the product releases a resource such as memory or a file so that it can be made available for reuse, but it does not clear or "zeroize" the information contained in the resource before the product performs a critical state transition or makes the resource available for reuse by other entities. In Duplicate Advisory, 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-r45x-ghr2-qjxc Affected Duplicate Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zeroize_derive
|
crates.io |
< 1.1.1
|
1.1.1
|
References
Frequently Asked Questions
What is GHSA-r45x-ghr2-qjxc?
Which Duplicate Advisory versions are affected?
What version fixes GHSA-r45x-ghr2-qjxc?
Is zeroize_derive affected?
What is the CVSS score of GHSA-r45x-ghr2-qjxc?
What CWE is associated with GHSA-r45x-ghr2-qjxc?
How can I check crates.io dependencies for GHSA-r45x-ghr2-qjxc?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r45x-ghr2-qjxc",
"modified" : "2022-06-23T17:29:03Z",
"published" : "2022-06-17T00:30:52Z",
"withdrawn" : "2022-06-23T17:29:03Z",
"aliases" : [ ],
"summary" : "Duplicate Advisory: `#[zeroize(drop)]` doesn't implement `Drop` for `enum`s",
"details" : "## Duplicate Advisory\nThis advisory is a duplicate of [GHSA-c5hx-w945-j4pq](https://github.com/advisories/GHSA-c5hx-w945-j4pq). This link is preserved to maintain external references.\n\n## Original Description\nAffected versions of this crate did not implement `Drop` when `#[zeroize(drop)]` was used on an `enum`.\n\nThis can result in memory not being zeroed out after dropping it, which is exactly what is intended when adding this attribute.\n\nThe flaw was corrected in version 1.2 and `#[zeroize(drop)]` on `enum`s now properly implements `Drop`.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "zeroize_derive"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/iqlusioninc/crates/issues/876"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/iqlusioninc/crates"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0115.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-226" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:30:52Z",
"nvd_published_at" : null
}
}