logo

CVE-2020-35905 futures-util

Package

Manager: cargo
Name: futures-util
Vulnerable Version: >=0.3.2 <0.3.7

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

CVSS v4.0: CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

EPSS: 0.00145 pctl0.3547

Details

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.

Metadata

Created: 2022-05-24T17:37:49Z
Modified: 2023-06-13T17:24:13Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-rh4w-94hh-9943/GHSA-rh4w-94hh-9943.json
CWE IDs: ["CWE-362"]
Alternative ID: GHSA-rh4w-94hh-9943
Finding: F124
Auto approve: 1