RUSTSEC-2019-0002

    Dashboard / Vulnerabilities / RUSTSEC-2019-0002

    RUSTSEC-2019-0002

    Published: 7 May 2019Last Modified: 4 Feb 2026

    Summary: Bug in SliceDeque::move_head_unchecked corrupts its memory

    Details: Affected versions of this crate entered a corrupted state if `mem::size_of::<T>() % allocation_granularity() != 0` and a specific allocation pattern was used: sufficiently shifting the deque elements over the mirrored page boundary. This allows an attacker that controls controls both element insertion and removal to corrupt the deque, such that reading elements from it would read bytes corresponding to other elements in the deque. (e.g. a read of T could read some bytes from one value and some bytes from an adjacent one, resulting in a T whose value representation is not meaningful). This is undefined behavior. The flaw was corrected by using a pair of pointers to track the head and tail of the deque instead of a pair of indices. This pair of pointers are represented using a Rust slice.

    Affected packages

    Package

    Name: slice-deque

    Purl: pkg:cargo/slice-deque

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0.0.0-0
    Fixed -0.2.0

    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