GHSA-3mv5-343c-w2qg json
Zerocopy: Some Ref methods are unsound with some type parameters
published 2y ago modified 2y ago also GHSA-rjhf-4mh8-9xjq , RUSTSEC-2023-0074
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io zerocopy 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, 0.7.31
Is GHSA-3mv5-343c-w2qg in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | zerocopy | >=0.2.2, <0.2.9 >=0.3.0, <0.3.2 >=0.4.0, <0.4.1 >=0.5.0, <0.5.2 >=0.6.0, <0.6.6 >=0.7.0, <0.7.31 |
0.2.9 0.3.2 0.4.1 0.5.2 0.6.6 0.7.31 |
References
-
github.com
/google/zerocopy/issues/679
web
-
github.com
/google/zerocopy/issues/71
web
-
github.com
/google/zerocopy/issues/716
web, report
-
github.com
/google/zerocopy
package
-
rustsec.org
/advisories/RUSTSEC-2023-0074.html
web, advisory
-
github.com
/google/zerocopy/security/advisories/GHSA-3mv5-343c-w2qg
web
-
crates.io
/crates/zerocopy
package
Sources
- GitHub Advisory GHSA-rjhf-4mh8-9xjq
- GitHub Advisory GHSA-3mv5-343c-w2qg
- OSV RUSTSEC-2023-0074
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.