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:48.155893Z
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&lt;Box&lt;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
{
    "nvd_published_at": null,
    "cwe_ids": [],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2023-11-14T18:32:20Z"
}
References

Affected packages

crates.io / self_cell

Package

Affected ranges

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

crates.io / self_cell

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Fixed
1.0.2