Security mailing lists by PureSourceCode

RUSTSEC-2023-0070

HIGH

Insufficient 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

SourceVendor / ecosystemProduct / packageAffected versionsFixed 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

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)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.