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
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2021-0089
Aliases
Published
2021-01-20T12:00:00Z
Modified
2023-11-08T04:07:21.872047Z
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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / raw-cpuid

Package

Affected ranges

Type
SEMVER
Events
Introduced
3.1.1-0
Fixed
9.1.1

Ecosystem specific

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

Database specific

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