Optional `Deserialize` implementations lacking validation
Moderate severity
GitHub Reviewed
Published
Jun 17, 2022
to the GitHub Advisory Database
•
Updated Jun 13, 2023
Description
Published to the GitHub Advisory Database
Jun 17, 2022
Reviewed
Jun 17, 2022
Last updated
Jun 13, 2023
When activating the non-default feature
serialize
, most structs implementserde::Deserialize
without sufficient validation. This allows breakinginvariants in safe code, leading to:
as_string()
methods (which usestd::str::from_utf8_unchecked()
internally).See gz/rust-cpuid#43.
References