RUSTSEC-2020-0059

    Dashboard / Vulnerabilities / RUSTSEC-2020-0059

    RUSTSEC-2020-0059

    Published: 22 Oct 2020Last Modified: 8 Nov 2023

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

    Details: 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.

    Affected packages

    Package

    Name: futures-util

    Purl: pkg:cargo/futures-util

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0.3.2
    Fixed -0.3.7

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    RUSTSEC-2020-0059 | CVE-DB