CVE-2020-35905
MEDIUM4.7EPSS 0.05%MutexGuard::map can cause a data race in safe code
Published: 5/24/2022Modified: 11/8/2023
Description
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.
Affected packages (2)
- crates.io/futures-util>= 0.3.2, < 0.3.7
- crates.io/futures-util>= 0.3.2, < 0.3.7
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM4.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |