RUSTSEC-2023-0070

Source
https://rustsec.org/advisories/RUSTSEC-2023-0070
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2023-0070.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2023-0070
Aliases
Published
2023-11-10T12:00:00Z
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
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / self_cell

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.10.3
Introduced
1.0.0
Fixed
1.0.2

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": null,
    "categories": []
}