mirror of
https://github.com/OMGeeky/advisory-db.git
synced 2025-12-27 06:29:31 +01:00
raw-cpuid: Optional Deserialize implementations lacking validation (#671)
This commit is contained in:
27
crates/raw-cpuid/RUSTSEC-0000-0000.md
Normal file
27
crates/raw-cpuid/RUSTSEC-0000-0000.md
Normal file
@@ -0,0 +1,27 @@
|
||||
```toml
|
||||
[advisory]
|
||||
id = "RUSTSEC-0000-0000"
|
||||
package = "raw-cpuid"
|
||||
date = "2021-01-20"
|
||||
url = "https://github.com/gz/rust-cpuid/issues/43"
|
||||
categories = ["memory-corruption", "denial-of-service"]
|
||||
|
||||
[versions]
|
||||
patched = []
|
||||
unaffected = ["<= 3.1.0"]
|
||||
```
|
||||
|
||||
# Optional `Deserialize` implementations lacking validation
|
||||
|
||||
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.
|
||||
|
||||
A fix is not yet available, but most use cases do not require enabling
|
||||
the `serialize` feature.
|
||||
Reference in New Issue
Block a user