GHSA-3mv5-343c-w2qg: Zerocopy :Ref Or Cell::RefMut Vulnerability
LOWGHSA-3mv5-343c-w2qg is a LOW :ref or cell::refmut vulnerability (General Security Weakness) affecting Zerocopy libraries in the crates.io ecosystem. The issue involves :ref or cell::refmut. Remediation is available by upgrading affected packages to version 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, 0.7.31.
GHSA-3mv5-343c-w2qg at a Glance
How to Fix GHSA-3mv5-343c-w2qg
To remediate this vulnerability, upgrade all affected Zerocopy 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 zerocopy to 0.2.9
Upgrade zerocopy to 0.3.2
Upgrade zerocopy to 0.4.1
Upgrade zerocopy to 0.5.2
Upgrade zerocopy to 0.6.6
Upgrade zerocopy to 0.7.31
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for zerocopy
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3mv5-343c-w2qg, inspect your project dependencies for Zerocopy:
inspect dependencies for zerocopy
Analyze the terminal output to locate any version of Zerocopy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.9), 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 Zerocopy, 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-3mv5-343c-w2qg Affected Zerocopy Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zerocopy
|
crates.io |
≥ 0.2.2
< 0.2.9
|
0.2.9
|
|
zerocopy
|
crates.io |
≥ 0.3.0
< 0.3.2
|
0.3.2
|
|
zerocopy
|
crates.io |
≥ 0.4.0
< 0.4.1
All 1 versions
0.4.0
|
0.4.1
|
|
zerocopy
|
crates.io |
≥ 0.5.0
< 0.5.2
|
0.5.2
|
|
zerocopy
|
crates.io |
≥ 0.6.0
< 0.6.6
|
0.6.6
|
|
zerocopy
|
crates.io |
≥ 0.7.0
< 0.7.31
|
0.7.31
|
References
Frequently Asked Questions
What is GHSA-3mv5-343c-w2qg?
Which Zerocopy versions are affected?
What version fixes GHSA-3mv5-343c-w2qg?
Is zerocopy affected?
What CWE is associated with GHSA-3mv5-343c-w2qg?
How can I check crates.io dependencies for GHSA-3mv5-343c-w2qg?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3mv5-343c-w2qg",
"modified" : "2024-02-12T15:57:36Z",
"published" : "2023-12-15T03:48:38Z",
"aliases" : [ ],
"summary" : "Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut",
"details" : "*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).*\n\nThe `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound and may allow safe code to exhibit undefined behavior when used with `Ref<B, T>` where `B` is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or [`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.\n\nSee https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.\n\nThe current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "zerocopy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.2.2"
}, {
"fixed" : "0.2.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "zerocopy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.3.0"
}, {
"fixed" : "0.3.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "zerocopy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.0"
}, {
"fixed" : "0.4.1"
} ]
} ],
"versions" : [ "0.4.0" ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "zerocopy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.0"
}, {
"fixed" : "0.5.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "zerocopy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.6.0"
}, {
"fixed" : "0.6.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "zerocopy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.7.0"
}, {
"fixed" : "0.7.31"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/google/zerocopy/security/advisories/GHSA-3mv5-343c-w2qg"
}, {
"type" : "WEB",
"url" : "https://github.com/google/zerocopy/issues/679"
}, {
"type" : "WEB",
"url" : "https://github.com/google/zerocopy/issues/716"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/google/zerocopy"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0074.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-15T03:48:38Z",
"nvd_published_at" : null
}
}