Ref methods into_ref, into_mut, into_slice, and into_slice_mut are unsound when used with cell::Ref or cell::RefMut
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
*This advisory is also published as [RUSTSEC-2023-0074](https://rustsec.org/advisories/RUSTSEC-2023-0074.html).* The `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`. See https://github.com/google/zerocopy/issues/716 for a more in-depth analysis. The current plan is to yank the affected versions soon. See https://github.com/google/zerocopy/issues/679 for more detail.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | zerocopy (crates.io) | 0.2.2 to before 0.2.9 | 0.2.9 | Patch available | GHSA-3mv5-343c-w2qg |
| — | zerocopy (crates.io) | 0.3.0 to before 0.3.2 | 0.3.2 | Patch available | GHSA-3mv5-343c-w2qg |
| — | zerocopy (crates.io) | 0.4.0 to before 0.4.1 | 0.4.1 | Patch available | GHSA-3mv5-343c-w2qg |
| — | zerocopy (crates.io) | 0.5.0 to before 0.5.2 | 0.5.2 | Patch available | GHSA-3mv5-343c-w2qg |
| — | zerocopy (crates.io) | 0.6.0 to before 0.6.6 | 0.6.6 | Patch available | GHSA-3mv5-343c-w2qg |
| — | zerocopy (crates.io) | 0.7.0 to before 0.7.31 | 0.7.31 | Patch available | GHSA-3mv5-343c-w2qg |
- zerocopy (crates.io) Vendor— Affected 0.2.2 to before 0.2.9 Fixed in 0.2.9 Patch available GHSA-3mv5-343c-w2qg
- zerocopy (crates.io) Vendor— Affected 0.3.0 to before 0.3.2 Fixed in 0.3.2 Patch available GHSA-3mv5-343c-w2qg
- zerocopy (crates.io) Vendor— Affected 0.4.0 to before 0.4.1 Fixed in 0.4.1 Patch available GHSA-3mv5-343c-w2qg
- zerocopy (crates.io) Vendor— Affected 0.5.0 to before 0.5.2 Fixed in 0.5.2 Patch available GHSA-3mv5-343c-w2qg
- zerocopy (crates.io) Vendor— Affected 0.6.0 to before 0.6.6 Fixed in 0.6.6 Patch available GHSA-3mv5-343c-w2qg
- zerocopy (crates.io) Vendor— Affected 0.7.0 to before 0.7.31 Fixed in 0.7.31 Patch available GHSA-3mv5-343c-w2qg
Remediation
- Fix · GHSA-3mv5-343c-w2qg zerocopy (crates.io) Fixed in 0.2.9 Advisory →
- Fix · GHSA-3mv5-343c-w2qg zerocopy (crates.io) Fixed in 0.3.2 Advisory →
- Fix · GHSA-3mv5-343c-w2qg zerocopy (crates.io) Fixed in 0.4.1 Advisory →
- Fix · GHSA-3mv5-343c-w2qg zerocopy (crates.io) Fixed in 0.5.2 Advisory →
- Fix · GHSA-3mv5-343c-w2qg zerocopy (crates.io) Fixed in 0.6.6 Advisory →
- Fix · GHSA-3mv5-343c-w2qg zerocopy (crates.io) Fixed in 0.7.31 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-3mv5-343c-w2qg
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences