CVE-2020-35905
MEDIUM4.7EPSS 0.05%MutexGuard::map can cause a data race in safe code
發布日:2022/5/24修改日:2023/11/8
描述
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.
受影響套件(2)
- crates.io/futures-util>= 0.3.2, < 0.3.7
- crates.io/futures-util>= 0.3.2, < 0.3.7
CVSS 分數
| 來源 | 版本 | 嚴重程度 | 向量 |
|---|---|---|---|
| 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 |