Files
advisory-db/crates/once_cell/RUSTSEC-2019-0017.md
2021-08-21 19:18:11 -06:00

843 B

[advisory]
id = "RUSTSEC-2019-0017"
package = "once_cell"
aliases = ["CVE-2019-16141"]
date = "2019-09-01"
keywords = ["undefined_behavior"]
url = "https://github.com/matklad/once_cell/issues/46"

[affected.functions]
"once_cell::sync::Lazy::deref" = ["< 1.0.1, >= 0.2.5"]
"once_cell::sync::Lazy::force" = ["< 1.0.1, >= 0.2.5"]
"once_cell::unsync::Lazy::deref" = ["< 1.0.1, >= 0.2.5"]
"once_cell::unsync::Lazy::force" = ["< 1.0.1, >= 0.2.5"]

[versions]
patched = [">= 1.0.1"]
unaffected = ["< 0.2.5"]

Panic during initialization of Lazy might trigger undefined behavior

If during the first dereference of Lazy 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.