From 22325889a465146e77271f84ed9f7c4a77d51393 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Sat, 21 Aug 2021 21:38:06 -0400 Subject: [PATCH] gfx-auxil: `Read` on uninitialized buffer may cause UB ( `gfx_auxil::read_spirv()` ) (#681) * Report 0101-gfx-auxil to RustSec * add 'informational = unsound' --- crates/gfx-auxil/RUSTSEC-0000-0000.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 crates/gfx-auxil/RUSTSEC-0000-0000.md diff --git a/crates/gfx-auxil/RUSTSEC-0000-0000.md b/crates/gfx-auxil/RUSTSEC-0000-0000.md new file mode 100644 index 000000000..db54a1dcb --- /dev/null +++ b/crates/gfx-auxil/RUSTSEC-0000-0000.md @@ -0,0 +1,19 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "gfx-auxil" +date = "2021-01-07" +url = "https://github.com/gfx-rs/gfx/issues/3567" +categories = ["memory-exposure"] +informational = "unsound" + +[versions] +patched = [] +``` + +# Reading on uninitialized buffer may cause UB ( `gfx_auxil::read_spirv()` ) + +Affected versions of this crate passes an uninitialized buffer to a user-provided `Read` implementation. + +Arbitrary `Read` implementations can read from the uninitialized buffer (memory exposure) and also can return incorrect number of bytes written to the buffer. +Reading from uninitialized memory produces undefined values that can quickly invoke undefined behavior.