Skip to content

Data races in unicycle

High severity GitHub Reviewed Published Aug 25, 2021 to the GitHub Advisory Database • Updated Jan 27, 2023

Package

cargo unicycle (Rust)

Affected versions

< 0.7.1

Patched versions

0.7.1

Description

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

Published by the National Vulnerability Database Aug 8, 2021
Reviewed Aug 18, 2021
Published to the GitHub Advisory Database Aug 25, 2021
Last updated Jan 27, 2023

Severity

High
8.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2020-36436

GHSA ID

GHSA-686f-ch3r-xwmh

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.