Lucene search

K
osvGoogleOSV:RUSTSEC-2021-0089
HistoryJan 20, 2021 - 12:00 p.m.

Optional `Deserialize` implementations lacking validation

2021-01-2012:00:00
Google
osv.dev
9
deserialize
validation
non-default
serialize
structs
serde
invariants
safe code
undefined behavior
panics
rust-cpuid
software

EPSS

0.002

Percentile

65.2%

When activating the non-default feature serialize, most structs implement
serde::Deserialize without sufficient validation. This allows breaking
invariants in safe code, leading to:

  • Undefined behavior in as_string() methods (which use
    std::str::from_utf8_unchecked() internally).
  • Panics due to failed assertions.

See https://github.com/gz/rust-cpuid/issues/43.

EPSS

0.002

Percentile

65.2%

Related for OSV:RUSTSEC-2021-0089