Data races in unicycle
High severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Jan 27, 2023
Description
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
Affected versions of this crate unconditionally implemented
Send
&Sync
for typesPinSlab<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>
orUnordered<T, S>
and accessed concurrently from multiple threads.The flaw was corrected in commits 92f40b4 & 6a6c367 by adding trait bound
T: Send
toSend
impls forPinSlab<T>
&Unordered<T, S>
and addingT: Sync
toSync
impls forPinSlab<T>
&Unordered<T, S>
.References