PT-2020-17537 · Rust · Futures-Util
Published
2020-10-22
·
Updated
2022-05-24
·
CVE-2020-35905
CVSS v3.1
4.7
Medium
| Vector | AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
futures-util crate versions prior to 0.3.7
Description
An issue in the futures-util crate can cause a data race for certain closure situations in safe code. The affected versions had a Send/Sync implementation for MappedMutexGuard that only considered variance on T, while MappedMutexGuard dereferenced to U. This could have led to data races in safe Rust code when a closure used in
MutexGuard::map() returns U that is unrelated to T.Recommendations
For versions prior to 0.3.7, update to version 0.3.7 or later to fix the issue by correcting the Send and Sync implementations and adding a
PhantomData<&'a mut U> marker to the MappedMutexGuard type.Exploit
Fix
Race Condition
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Futures-Util