futures-task known bugs

cargo

4 known bugs in futures-task, with affected versions, fixes and workarounds. Sourced from upstream issue trackers.

4
bugs
Known bugs
SeverityAffectedFixed inTitleStatusSource
high0.2.10.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.
fixedosv:GHSA-r93v-9p5q-vhpf
medium0.0.0-00.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.
fixedosv:RUSTSEC-2020-0061
medium0.2.2-00.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.
fixedosv:RUSTSEC-2020-0060
mediumany0.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.
fixedosv:GHSA-p9m5-3hj7-cp5r
API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/bugs/cargo/futures-task
futures-task bugs — known issues per version | DepScope | DepScope