futures-util known bugs

cargo

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

4
bugs
Known bugs
SeverityAffectedFixed inTitleStatusSource
medium0.3.00.3.2
Improper `Sync` implementation on `FuturesUnordered` in futures-utils can cause data corruption
Affected versions of the crate had an unsound `Sync` implementation on the `FuturesUnordered` structure, which used a `Cell` for interior mutability without any code to handle synchronized access to the underlying task list's length and head safely. This could of lead to data corruption since two threads modifying the list at once could see incorrect values due to the lack of access synchronization. The issue was fixed by adding access synchronization code around insertion of tasks into the list.
fixedosv:RUSTSEC-2020-0062
medium0.3.20.3.7
MutexGuard::map can cause a data race in safe code
Affected versions of the crate had a Send/Sync implementation for MappedMutexGuard that only considered variance on T, while MappedMutexGuard dereferenced to U. This could of led to data races in safe Rust code when a closure used in MutexGuard::map() returns U that is unrelated to T. The issue was fixed by fixing `Send` and `Sync` implementations, and by adding a `PhantomData<&'a mut U>` marker to the `MappedMutexGuard` type to tell the compiler that the guard is over U too.
fixedosv:RUSTSEC-2020-0059
medium0.3.20.3.7
MutexGuard::map can cause a data race in safe code
Affected versions of the crate had a Send/Sync implementation for MappedMutexGuard that only considered variance on T, while MappedMutexGuard dereferenced to U. This could of led to data races in safe Rust code when a closure used in MutexGuard::map() returns U that is unrelated to T. The issue was fixed by fixing Send and Sync implementations, and by adding a PhantomData<&'a mut U> marker to the MappedMutexGuard type to tell the compiler that the guard is over U too.
fixedosv:GHSA-rh4w-94hh-9943
medium0.3.00.3.2
Improper `Sync` implementation on `FuturesUnordered` in futures-utils can cause data corruption
An issue was discovered in the futures-util crate before 0.3.2 for Rust. FuturesUnordered can lead to data corruption because Sync is mishandled.
fixedosv:GHSA-5r9g-j7jj-hw6c
API access

Get this data programmatically \u2014 free, no authentication.

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