GHSA-vgmh-mqm4-8j88
JSON

medium

pared Vulnerable to Use After Free in `Parc` and `Prc` Due to Missing Lifetime Constraints

Severity
medium CVSS:4.0 by GitHub
Published
Last changed
Also known as
RUSTSEC-2025-0016

Description

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

This flaw was fixed in 108f540ea8acb6073751a1aa386085c1cdc4fd1e by requiring that the type stored in the Arcs and Rcs passed to these functions contain T: 'static.

Affected

Product or packageVersionsReported by
pared (crates.io)before 0.4.0, from 0.0.0-0 before 0.4.0GitHub Advisory Database, RustSec Advisory Database

Classification

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-vgmh-mqm4-8j88 changed 2025-10-28CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2025-0016 changed 2025-10-28CC0-1.0