GHSA-48m6-wm5p-rr6h json
Insufficient covariance check makes self_cell unsound
published 3y ago modified 2y ago also RUSTSEC-2023-0070
- 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
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`.
Patch / fix
- crates.io self_cell 0.10.3, 1.0.2
Is GHSA-48m6-wm5p-rr6h 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 | self_cell | <0.10.3 >=1.0.0, <1.0.2 >=0.0.0-0, <0.10.3 |
0.10.3 1.0.2 |
References
-
github.com
/Voultapher/self_cell/issues/49
web, report
-
github.com
/Voultapher/self_cell
package
-
rustsec.org
/advisories/RUSTSEC-2023-0070.html
web, advisory
-
crates.io
/crates/self_cell
package
Sources
- GitHub Advisory GHSA-48m6-wm5p-rr6h
- OSV RUSTSEC-2023-0070
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.