All reports
Medium

MutexGuard::map can cause a data race in safe code

Affected versions

Version ranges need review.

Rust / Cargofutures-util
Affected versions
>=0.3.2 <0.3.7
Fixed version
0.3.7
Rust / Cargofutures-util
Affected versions
>= 0.3.2, < 0.3.7
Fixed version
0.3.7

Exploitation

CVE-2020-35905

Probability of exploitation in the next 30 days: 0.26%

FIRST EPSS · 2026-11-23

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.

Links