Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. pared
  4. ›
  5. GHSA-vgmh-mqm4-8j88

GHSA-vgmh-mqm4-8j88: pared Vulnerable to Use After Free in `Parc` and `Prc` Due to Missing Lifetime Constraints

March 24, 2025

Affected versions of this crate didn’t provide sufficient lifetime constraints to conversion functions from alloc::sync::Arc and alloc::rc::Rc, which made it possible to create projections of these reference counted pointers. Unlike the original reference counted pointers, these projections could outlive original data’s lifetimes.

This projected pointer could cause the original Arc’s or Rc’s Drop::drop to get called at a point where the original data was no longer valid, leading to a potential use after free.

The affected functions were

  • pared::prc::Prc::from_rc
  • pared::prc::Prc::project
  • pared::prc::Prc::try_from_rc
  • pared::sync::Parc::from_arc
  • pared::sync::Parc::project
  • pared::sync::Parc::try_from_arc

References

  • github.com/advisories/GHSA-vgmh-mqm4-8j88
  • github.com/radekvit/pared
  • github.com/radekvit/pared/commit/108f540ea8acb6073751a1aa386085c1cdc4fd1e
  • github.com/radekvit/pared/issues/2
  • rustsec.org/advisories/RUSTSEC-2025-0016.html

Code Behaviors & Features

Detect and mitigate GHSA-vgmh-mqm4-8j88 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.4.0

Fixed versions

  • 0.4.0

Solution

Upgrade to version 0.4.0 or above.

Weakness

  • CWE-416: Use After Free

Source file

cargo/pared/GHSA-vgmh-mqm4-8j88.yml

Spotted a mistake? Edit the file on GitLab.

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

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