RUSTSEC-2023-0070
HIGHInsufficient covariance check makes self_cell unsound
All public versions prior to 1.02 used an insufficient check to ensure that users correctly marked the dependent type as either covariant or not_covariant. This allowed users to mark a dependent as covariant even though its type was not covariant but invariant, for certain invariant types involving trait object lifetimes. One example for such a dependent type is type Dependent<'a> = RefCell<Box<dyn fmt::Display + 'a>>. Such a type allowed unsound usage in purely safe user code that leads to undefined behavior. The patched versions now produce a compile time error if such a type is marked as covariant.
- Published
- 10 Nov 2023
- Last modified
- 10 Feb 2024
- Also known as
- GHSA-48m6-wm5p-rr6h
- Sources
- OSV GHSA-48m6-wm5p-rr6hJSONOSVJSON
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | self_cell | < 0.10.3 | 0.10.3 |
| OSV | crates.io | self_cell | >= 1.0.0, < 1.0.2 | 1.0.2 |
| OSV | crates.io | self_cell | >= 0.0.0-0, < 0.10.3; >= 1.0.0, < 1.0.2 | 0.10.3, 1.0.2 |
References
- https://github.com/Voultapher/self_cell/issues/49 · WEB, REPORT
- https://github.com/Voultapher/self_cell · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2023-0070.html · WEB, ADVISORY
- https://crates.io/crates/self_cell · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 10 Nov 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 14 Nov 2023)