Advisory

GHSA-hr3c-6mmp-6m39

Also known as: CVE-2018-20995, RUSTSEC-2018-0008

Summary

Memory corruption slice-deque

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2021-08-25 20:42 UTC
Modified
2023-11-08 04:00 UTC

Affected packages and fixes

slice-deque

crates.io · All systems

Affected

  • introduced 0, fixed 0.1.16 (semver)

Fixed versions

0.1.16

Fix

  • Fixed version 0.1.16
    cargo update -p slice-deque --precise 0.1.16

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences