Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. self_cell
  4. ›
  5. GHSA-48m6-wm5p-rr6h

GHSA-48m6-wm5p-rr6h: Insufficient covariance check makes self_cell unsound

November 14, 2023

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.

References

  • github.com/Voultapher/self_cell
  • github.com/Voultapher/self_cell/issues/49
  • github.com/advisories/GHSA-48m6-wm5p-rr6h
  • rustsec.org/advisories/RUSTSEC-2023-0070.html

Code Behaviors & Features

Detect and mitigate GHSA-48m6-wm5p-rr6h with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.10.3, all versions starting from 1.0.0 before 1.0.2

Fixed versions

  • 0.10.3
  • 1.0.2

Solution

Upgrade to versions 0.10.3, 1.0.2 or above.

Source file

cargo/self_cell/GHSA-48m6-wm5p-rr6h.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:20 +0000.