RUSTSEC-2021-0089

Source
https://rustsec.org/advisories/RUSTSEC-2021-0089
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0089.json
Aliases
Published
2021-01-20T12:00:00Z
Modified
2023-11-08T04:07:21.872047Z
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.

References

Affected packages

crates.io / raw-cpuid

Package

Name
raw-cpuid

Affected ranges

Type
SEMVER
Events
Introduced
3.1.1-0
Fixed
9.1.1

Ecosystem specific

{
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": null,
    "categories": [
        "memory-corruption",
        "denial-of-service"
    ]
}