mirror of
https://github.com/OMGeeky/advisory-db.git
synced 2025-12-30 16:24:05 +01:00
Merge pull request #588 from JOE1994/atomic-option
unconditional Sync impl of `AtomicOption<T>` allows UB
This commit is contained in:
19
crates/atomic-option/RUSTSEC-0000-0000.md
Normal file
19
crates/atomic-option/RUSTSEC-0000-0000.md
Normal file
@@ -0,0 +1,19 @@
|
||||
```toml
|
||||
[advisory]
|
||||
id = "RUSTSEC-0000-0000"
|
||||
package = "atomic-option"
|
||||
date = "2020-10-31"
|
||||
url = "https://github.com/reem/rust-atomic-option/issues/4"
|
||||
categories = ["memory-corruption"]
|
||||
|
||||
[versions]
|
||||
patched = []
|
||||
```
|
||||
|
||||
# AtomicOption should have Send + Sync bound on its type argument.
|
||||
|
||||
In the affected versions of this crate,
|
||||
`AtomicOption<T>` unconditionally implements `Sync`.
|
||||
|
||||
This allows programmers to move non-Sync types across thread boundaries (e.g. `Rc<T>`, `Arc<Cell<T>>`), which can lead to data races and undefined behavior.
|
||||
It is also possible to send non-Send types like `std::sync::MutexGuard` to other threads, which can lead to undefined behavior.
|
||||
Reference in New Issue
Block a user