Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. slice-deque
  4. ›
  5. CVE-2019-15543

CVE-2019-15543: Out of bounds write in slice-deque

August 25, 2021 (updated June 13, 2023)

Affected versions of this crate entered a corrupted state if mem::size_of::() % 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.

References

  • github.com/advisories/GHSA-c3m3-c39q-pv23
  • github.com/gnzlbg/slice_deque
  • github.com/gnzlbg/slice_deque/issues/57
  • nvd.nist.gov/vuln/detail/CVE-2019-15543
  • rustsec.org/advisories/RUSTSEC-2019-0002.html

Code Behaviors & Features

Detect and mitigate CVE-2019-15543 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.2.0

Fixed versions

  • 0.2.0

Solution

Upgrade to version 0.2.0 or above.

Impact 9.8 CRITICAL

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-787: Out-of-bounds Write

Source file

cargo/slice-deque/CVE-2019-15543.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:07 +0000.