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

CVE-2018-20995: Memory corruption slice-deque

August 25, 2021 (updated June 13, 2023)

Affected versions of this crate did not properly update the head and tail of the deque when inserting and removing elements from the front if, before insertion or removal, the tail of the deque was in the mirrored memory region, and if, after insertion or removal, the head of the deque is exactly at the beginning of the mirrored memory region.

An attacker that controls both element insertion and removal into the deque could put it in a corrupted state. Once the deque enters such an state, its head and tail are corrupted, but in bounds of the allocated memory. This can result in partial reads and writes, reads of uninitialized memory, reads of memory containing previously dropped objects, etc. An attacker could exploit this to alter program execution.

The flaw was corrected by properly updating the head and tail of the deque in this case.

References

  • github.com/advisories/GHSA-hr3c-6mmp-6m39
  • github.com/gnzlbg/slice_deque
  • github.com/gnzlbg/slice_deque/issues/57
  • nvd.nist.gov/vuln/detail/CVE-2018-20995
  • rustsec.org/advisories/RUSTSEC-2018-0008.html

Code Behaviors & Features

Detect and mitigate CVE-2018-20995 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.1.16

Fixed versions

  • 0.1.16

Solution

Upgrade to version 0.1.16 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer

Source file

cargo/slice-deque/CVE-2018-20995.yml

Spotted a mistake? Edit the file on GitLab.

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

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