Lucene search

K
osvGoogleOSV:GHSA-JF5H-CF95-W759
HistoryJun 17, 2022 - 12:16 a.m.

Optional `Deserialize` implementations lacking validation

2022-06-1700:16:24
Google
osv.dev
11
serialization
deserialization
validation
rust
cpuid issue

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:GHSA-JF5H-CF95-W759