GHSA-48m6-wm5p-rr6h

Suggest an improvement
Source
https://github.com/advisories/GHSA-48m6-wm5p-rr6h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/11/GHSA-48m6-wm5p-rr6h/GHSA-48m6-wm5p-rr6h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-48m6-wm5p-rr6h
Aliases
Published
2023-11-14T18:32:20Z
Modified
2024-02-10T16:26:48Z
Summary
Insufficient covariance check makes self_cell unsound
Details

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.

Database specific
{
    "cwe_ids":  [],
    "github_reviewed":  true,
    "github_reviewed_at":  "2023-11-14T18:32:20Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

crates.io / self_cell

Package

Name
self_cell
View open source insights on deps.dev
Purl
pkg:cargo/self_cell

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.10.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/11/GHSA-48m6-wm5p-rr6h/GHSA-48m6-wm5p-rr6h.json"

crates.io / self_cell

Package

Name
self_cell
View open source insights on deps.dev
Purl
pkg:cargo/self_cell

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Fixed
1.0.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/11/GHSA-48m6-wm5p-rr6h/GHSA-48m6-wm5p-rr6h.json"