Advisory

RUSTSEC-2019-0017

Also known as: CVE-2019-16141, GHSA-7j44-fv4x-79g9

Summary

Panic during initialization of Lazy<T> might trigger undefined behavior

Details

If during the first dereference of Lazy<T> the initialization function panics,
subsequent dereferences will execute std::hints::unreachable_unchecked.

Applications with panic = "abort" are not affected, as there will be no
subsequent dereferences.

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
2019-09-01 12:00 UTC
Modified
2023-11-08 04:01 UTC

Affected packages and fixes

once_cell

crates.io · All systems

Affected

  • introduced 0.2.5, fixed 1.0.1 (semver)

Fixed versions

1.0.1

Fix

  • Fixed version 1.0.1
    cargo update -p once_cell --precise 1.0.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