Data races in bunch
High severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Feb 1, 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
Feb 1, 2023
An issue was discovered in the bunch crate through 2020-11-12 for Rust.
Affected versions of this crate unconditionally implements
Send
/Sync
forBunch<T>
.This allows users to insert
T: !Sync
toBunch<T>
. It is possible to create a data race to aT: !Sync
by invoking theBunch::get()
API (which returns&T
) from multiple threads. It is also possible to sendT: !Send
to other threads by insertingT
insideBunch<T>
and sendingBunch<T>
to another thread, allowing to create a data race by inserting types likeT = Rc<_>
.Such data races can lead to memory corruption.
References