Advisory

RUSTSEC-2020-0072

Also known as: CVE-2020-35915, GHSA-4hjg-cx88-g9f9

Summary

GenericMutexGuard allows data races of non-Sync types across threads

Details

GenericMutexGuard<T> was given the Sync auto trait as long as T is Send
due to its contained members. However, since the guard is supposed to represent
an acquired lock and allows concurrent access to the underlying data from
different threads, it should only be Sync when the underlying data is.

This is a soundness issue and allows data races, potentially leading to crashes
and segfaults from safe Rust code.

The flaw was corrected by adding a T: Send + Sync bound for
GenericMutexGuard's Sync trait.

This bug is similar to one in
std::sync::Mutex.

Severity

Medium Basis: CVSS v3 score 5.5, vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2020-10-31 12:00 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

futures-intrusive

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.4.0 (semver)

Fixed versions

0.4.0

Fix

  • Fixed version 0.4.0
    cargo update -p futures-intrusive --precise 0.4.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences