From 4418b8d1a358eb2aaf45626c85250f4ff5dd6d8d Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Sun, 28 Mar 2021 23:32:12 -0700 Subject: [PATCH] Report uninitialized memory drop in adtensor --- crates/adtensor/RUSTSEC-0000-0000.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 crates/adtensor/RUSTSEC-0000-0000.md diff --git a/crates/adtensor/RUSTSEC-0000-0000.md b/crates/adtensor/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..f9dccff --- /dev/null +++ b/crates/adtensor/RUSTSEC-0000-0000.md @@ -0,0 +1,21 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "adtensor" +date = "2021-01-11" +url = "https://github.com/charles-r-earp/adtensor/issues/4" +categories = ["memory-corruption"] +keywords = ["memory-safety"] + +[versions] +patched = [] +``` + +# FromIterator implementation for Vector/Matrix can drop uninitialized memory + +The `FromIterator` methods for `Vector` and `Matrix` rely on the type +parameter `N` to allocate space in the iterable. + +If the passed in `N` type parameter is larger than the number of items returned +by the iterator, it can lead to uninitialized memory being left in the +`Vector` or `Matrix` type which gets dropped.