Advisory

GHSA-jf5h-cf95-w759

Also known as: CVE-2021-45687, GHSA-w428-f65r-h4q2, RUSTSEC-2021-0089

Summary

Optional Deserialize implementations lacking validation

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-06-17 00:16 UTC
Modified
2023-11-08 04:07 UTC

Affected packages and fixes

raw-cpuid

crates.io · All systems

Affected

  • introduced 3.1.0, fixed 9.1.1 (semver)

Fixed versions

9.1.1

Fix

  • Fixed version 9.1.1
    cargo update -p raw-cpuid --precise 9.1.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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences