Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. unicycle
  4. ›
  5. GHSA-7mg7-m5c3-3hqj

GHSA-7mg7-m5c3-3hqj: Data races in unicycle

August 25, 2021

Affected versions of this crate unconditionally implemented Send & Sync for types PinSlab<T> & Unordered<T, S>. This allows sending non-Send types to other threads and concurrently accessing non-Sync types from multiple threads.

This can result in a data race & memory corruption when types that provide internal mutability without synchronization are contained within PinSlab<T> or Unordered<T, S> and accessed concurrently from multiple threads.

The flaw was corrected in commits 92f40b4 & 6a6c367 by adding trait bound T: Send to Send impls for PinSlab<T> & Unordered<T, S> and adding T: Sync to Sync impls for PinSlab<T> & Unordered<T, S>.

References

  • github.com/advisories/GHSA-7mg7-m5c3-3hqj
  • github.com/udoprog/unicycle
  • github.com/udoprog/unicycle/commit/6a6c367a0c25f86f998fa315ea90c328f685b194
  • github.com/udoprog/unicycle/commit/92f40b4a2c671553dfa96feacff0265206c44ce5
  • github.com/udoprog/unicycle/issues/8
  • rustsec.org/advisories/RUSTSEC-2020-0116.html

Code Behaviors & Features

Detect and mitigate GHSA-7mg7-m5c3-3hqj 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.7.1

Fixed versions

  • 0.7.1

Solution

Upgrade to version 0.7.1 or above.

Weakness

  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Source file

cargo/unicycle/GHSA-7mg7-m5c3-3hqj.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.