futures-task known bugs
cargo4 known bugs in futures-task, with affected versions, fixes and workarounds. Sourced from upstream issue trackers.
4
bugs
Known bugs
| Severity | Affected | Fixed in | Title | Status | Source |
|---|---|---|---|---|---|
| high | 0.2.1 | 0.3.6 | futures_task::waker may cause a use-after-free if used on a type that isn't 'static Affected versions of the crate did not properly implement a 'static lifetime bound on the waker function. This resulted in a use-after-free if Waker::wake() is called after original data had been dropped.
The flaw was corrected by adding 'static lifetime bound to the data waker takes. | fixed | osv:GHSA-r93v-9p5q-vhpf |
| medium | 0.0.0-0 | 0.3.5 | futures_task::noop_waker_ref can segfault due to dereferencing a NULL pointer Affected versions of the crate used a `UnsafeCell` in thread-local storage to return a noop waker reference,
assuming that the reference would never be returned from another thread.
This resulted in a segmentation fault crash if `Waker::wake_by_ref()` was called on a waker returned from another thread due to
it attempting to dereference a pointer that wasn't accessible from the main thread.
Reproduction Example (from issue):
```rust
use futures_task::noop_waker_ref;
fn main() {
let waker = std::thread::spawn(|| noop_waker_ref()).join().unwrap();
waker.wake_by_ref();
}
```
The flaw was corrected by using a `OnceCell::Lazy<>` wrapper around the noop waker instead of thread-local storage. | fixed | osv:RUSTSEC-2020-0061 |
| medium | 0.2.2-0 | 0.3.6 | futures_task::waker may cause a use-after-free if used on a type that isn't 'static Affected versions of the crate did not properly implement a `'static` lifetime bound on the `waker` function.
This resulted in a use-after-free if `Waker::wake()` is called after original data had been dropped.
The flaw was corrected by adding `'static` lifetime bound to the data `waker` takes. | fixed | osv:RUSTSEC-2020-0060 |
| medium | any | 0.3.5 | futures_task::noop_waker_ref can segfault due to dereferencing a NULL pointer Affected versions of the crate used a UnsafeCell in thread-local storage to return a noop waker reference, assuming that the reference would never be returned from another thread.
This resulted in a segmentation fault crash if Waker::wake_by_ref() was called on a waker returned from another thread due to it attempting to dereference a pointer that wasn't accessible from the main thread. | fixed | osv:GHSA-p9m5-3hj7-cp5r |
API access
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/bugs/cargo/futures-task