Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1yaDR3LTk0aGgtOTk0M84AAnD0

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.

Permalink: https://github.com/advisories/GHSA-rh4w-94hh-9943
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yaDR3LTk0aGgtOTk0M84AAnD0
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: almost 2 years ago
Updated: 11 months ago


CVSS Score: 4.7
CVSS vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Identifiers: GHSA-rh4w-94hh-9943, CVE-2020-35905
References: Repository: https://github.com/rust-lang/futures-rs
Blast Radius: 22.0

Affected Packages

cargo:futures-util
Dependent packages: 2,333
Dependent repositories: 48,022
Downloads: 159,355,153 total
Affected Version Ranges: >= 0.3.2, < 0.3.7
Fixed in: 0.3.7
All affected versions: 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6
All unaffected versions: 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17, 0.3.18, 0.3.19, 0.3.20, 0.3.21, 0.3.22, 0.3.23, 0.3.24, 0.3.25, 0.3.26, 0.3.27, 0.3.28, 0.3.29, 0.3.30