GitHub Advisoryadvisory · crates.io

GHSA-hr3c-6mmp-6m39 Memory corruption slice-deque

CRITICAL Published 2021-08-25 Modified 2023-06-13 Official page ↗
Aliases
CVE-2018-20995
Ecosystem
crates.io
Packages
slice-deque
Severity
Critical
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-119
Reviewed
2021-08-19

Affected packages

• crates.io slice-deque: < 0.1.16 → fixed in 0.1.16

Description

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.

Related

Alias · CVE (1)

  • CVE-2018-20995 An issue was discovered in the slice-deque crate before 0.1.16 for Rust. vulnerability

Weakness · CWE (1)

  • CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer weakness

References