Advisory

RUSTSEC-2020-0070

Also known as: CVE-2020-35910, CVE-2020-35911, CVE-2020-35912, CVE-2020-35913, CVE-2020-35914, GHSA-5wg8-7c9q-794v, GHSA-gmv4-vmx3-x9f3, GHSA-hj9h-wrgg-hgmx, GHSA-ppj3-7jw3-8vc4, GHSA-vh4p-6j7g-f4j9

Summary

Some lock_api lock guard objects can cause data races

Details

Affected versions of lock_api had unsound implementations of the Send or
Sync traits for some guard objects, namely:

  • MappedMutexGuard
  • MappedRwLockReadGuard
  • MappedRwLockWriteGuard
  • RwLockReadGuard
  • RwLockWriteGuard

These guards could allow data races through types that are not safe to Send
across thread boundaries in safe Rust code.

This issue was fixed by changing the trait bounds on the Mapped guard types
and removing the Sync trait for the RwLock guards.

Severity

Not rated by the source.

Dates

Published
2020-11-08 12:00 UTC
Modified
2024-03-15 00:05 UTC

Affected packages and fixes

lock_api

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.4.2 (semver)

Fixed versions

0.4.2

Fix

  • Fixed version 0.4.2
    cargo update -p lock_api --precise 0.4.2

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