Lucene search

K
osvGoogleOSV:RUSTSEC-2020-0121
HistoryNov 10, 2020 - 12:00 p.m.

AtomicBox<T> implements Send/Sync for any `T: Sized`

2020-11-1012:00:00
Google
osv.dev
5
atomicbox
thread safety
data race

EPSS

0.002

Percentile

61.8%

Affected versions of this crate implements Send/Sync for AtomicBox&lt;T&gt; without requiring T: Send/T: Sync. This allows to create data races to T: !Sync and send T: !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 commit 34c2b9e by adding trait bound T: Send to Send impl for AtomicBox&lt;T&gt; and trait bound T: Sync to Sync impl for AtomicBox&lt;T&gt;.

EPSS

0.002

Percentile

61.8%

Related for OSV:RUSTSEC-2020-0121