Skip to content

Commit b5bd33c

Browse files
authored
zerocopy: Some Ref methods are unsound with some type params
For more information: - google/zerocopy#716 - GHSA-3mv5-343c-w2qg
1 parent 6ef1d1f commit b5bd33c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

crates/zerocopy/RUSTSEC-0000-0000.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "zerocopy"
5+
date = "2023-12-14"
6+
url = "https://github.com/google/zerocopy/issues/716"
7+
keywords = ["ref", "refcell", "mutable-aliasing"]
8+
9+
[versions]
10+
patched = [">= 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"]
11+
unaffected = ["< 0.2.2"]
12+
13+
[affected.functions]
14+
"zerocopy::Ref::into_ref" = "*"
15+
"zerocopy::Ref::into_mut" = "*"
16+
"zerocopy::Ref::into_slice" = "*"
17+
"zerocopy::Ref::into_mut_slice" = "*"
18+
```
19+
20+
# RustSec Advisory Template - Advisory Title Goes Here
21+
22+
The `Ref` methods `into_ref`, `into_mut`, `into_slice`, and `into_slice_mut` are unsound
23+
and may allow safe code to exhibit undefined behavior when used with `Ref<B, T>` where `B`
24+
is [`cell::Ref`](https://doc.rust-lang.org/core/cell/struct.Ref.html) or
25+
[`cell::RefMut`](https://doc.rust-lang.org/core/cell/struct.RefMut.html). Note that these
26+
methods remain sound when used with `B` types other than `cell::Ref` or `cell::RefMut`.
27+
28+
See https://github.com/google/zerocopy/issues/716 for a more in-depth analysis.
29+
30+
The current plan is to yank the affected versions soon. See
31+
https://github.com/google/zerocopy/issues/679 for more detail.

0 commit comments

Comments
 (0)