Advisory

RUSTSEC-2020-0145

Also known as: CVE-2020-36464, GHSA-qgwf-r2jj-2ccv

Summary

Use-after-free when cloning a partially consumed Vec iterator

Details

The IntoIter Clone implementation clones the whole underlying Vec.
If the iterator is partially consumed the consumed items will be copied, thus creating a use-after-free access.

A proof of concept is available in the original bug report.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2020-11-02 12:00 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

heapless

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.6.1 (semver)

Fixed versions

0.6.1

Fix

  • Fixed version 0.6.1
    cargo update -p heapless --precise 0.6.1

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: RustSec Advisory Database · CC0-1.0

Sources & licences