From 0638fb626e03b7a9fbbe57ab05847ee55e2cf543 Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Tue, 19 Jan 2021 23:32:36 -0500 Subject: [PATCH] Report 0084-autorand to RustSec --- crates/autorand/RUSTSEC-0000-0000.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crates/autorand/RUSTSEC-0000-0000.md diff --git a/crates/autorand/RUSTSEC-0000-0000.md b/crates/autorand/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..9b50b43 --- /dev/null +++ b/crates/autorand/RUSTSEC-0000-0000.md @@ -0,0 +1,17 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "autorand" +date = "2020-12-31" +url = "https://github.com/mersinvald/autorand-rs/issues/5" +categories = ["memory-corruption"] + +[versions] +patched = [">= 0.2.3"] +``` + +# `impl Random` on arrays can lead to dropping uninitialized memory + +Affected versions of this crate had a panic safety issue to drop partially uninitialized array of `T` upon panic in a user provided function `T::random()`. Dropping uninitialized `T` can potentially cause memory corruption or undefined behavior. + +The flaw was corrected in commit 565d508 by using `MaybeUninit` to avoid possible dropping of uninitialized memory upon panic.