Data race in abox
High severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Jun 13, 2023
Description
Published by the National Vulnerability Database
Aug 8, 2021
Reviewed
Aug 9, 2021
Published to the GitHub Advisory Database
Aug 25, 2021
Last updated
Jun 13, 2023
Affected versions of this crate implements
Send
/Sync
forAtomicBox<T>
without requiringT: Send
/T: Sync
. This allows to create data races toT: !Sync
and sendT: !Send
to another thread. Such behavior breaks the compile-time thread safety guarantees of Rust, and allows users to incur undefined behavior using safe Rust (e.g. memory corruption from data race). The flaw was corrected in commit34c2b9e
by adding trait boundT: Send
toSend
impl forAtomicBox<T>
and trait boundT: Sync
toSync
impl forAtomicBox<T>
.References