RUSTSEC-2019-0017

Panic during initialization of Lazy might trigger undefined behavior

Issued
Package
once_cell (crates.io)
Type
Vulnerability
Aliases
Details
https://github.com/matklad/once_cell/issues/46
Patched
  • >=1.0.1
Unaffected
  • <0.2.5
Keywords
  • undefined_behavior
Affected Functions
Version
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

Description

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.

More