Advisory

RUSTSEC-2021-0033

Also known as: CVE-2021-28034, CVE-2021-28035, GHSA-45w7-7g63-2m5w, GHSA-8mjx-h23h-w2pg

Summary

push_cloned can drop uninitialized memory or double free on panic

Details

Affected versions of stack_dst used a push_inner function that increased
the internal length of the array and then called val.clone().

If the val.clone() call panics, the stack could drop an already dropped
element or drop uninitialized memory.

This issue was fixed in 2a4d538 by increasing the length of the array after
elements are cloned.

Severity

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

Dates

Published
2021-02-22 12:00 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

stack_dst

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 stack_dst --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