mirror of
https://github.com/OMGeeky/advisory-db.git
synced 2025-12-29 15:56:07 +01:00
Merge pull request #592 from JOE1994/buttplug
data race in `ButtplugFutureStateShared<T>`
This commit is contained in:
21
crates/buttplug/RUSTSEC-0000-0000.md
Normal file
21
crates/buttplug/RUSTSEC-0000-0000.md
Normal file
@@ -0,0 +1,21 @@
|
||||
```toml
|
||||
[advisory]
|
||||
id = "RUSTSEC-0000-0000"
|
||||
package = "buttplug"
|
||||
date = "2020-12-18"
|
||||
url = "https://github.com/buttplugio/buttplug-rs/issues/225"
|
||||
categories = ["memory-corruption"]
|
||||
|
||||
[versions]
|
||||
# Versions which include fixes for this vulnerability
|
||||
patched = [">= 1.0.4"]
|
||||
```
|
||||
|
||||
# ButtplugFutureStateShared allows data race to (!Send|!Sync) objects
|
||||
|
||||
`ButtplugFutureStateShared<T>` implements `Send` & `Sync` regardless of `T`.
|
||||
|
||||
If `T: !Send` for `ButtplugFutureStateShared<T>`, it is possible to move non-Send types across thread boundaries (e.g. `T`=`Rc<T>`) and lead to undefined behavior.
|
||||
If `T: !Sync` for `ButtplugFutureStateShared<T>`, it is possible to cause data race to `T` (e.g. `T`=`Arc<Cell<_>>`) and lead to undefined behavior.
|
||||
|
||||
The flaw was corrected in version 1.0.4 by removing manual implementations of `Send`/`Sync` for `ButtplugFutureStateShared<T>` to let rustc generate auto trait implementations with correct trait bounds on `T`.
|
||||
Reference in New Issue
Block a user