From b4afb832c4e276d00cf6df38298b0455a7bfb71a Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Mon, 1 Mar 2021 11:54:59 -0800 Subject: [PATCH] Report uninitialized memory exposure in truetype --- crates/truetype/RUSTSEC-0000-0000.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 crates/truetype/RUSTSEC-0000-0000.md diff --git a/crates/truetype/RUSTSEC-0000-0000.md b/crates/truetype/RUSTSEC-0000-0000.md new file mode 100644 index 0000000..3457dd8 --- /dev/null +++ b/crates/truetype/RUSTSEC-0000-0000.md @@ -0,0 +1,22 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "truetype" +date = "2021-02-17" +url = "https://github.com/bodoni/truetype/issues/11" +categories = ["memory-exposure"] + +[versions] +patched = [">= 0.30.1"] +``` + +# Tape::take_bytes exposes uninitialized memory to a user-provided Read + +Affected versions of this crate passed an unininitialized buffer to a +user-provided `Read` instance in `Tape::take_bytes`. + +This can result in safe `Read` implementations reading from the uninitialized +buffer leading to undefined behavior. + +The flaw was corrected in commit `1f2dc7f37dd` by removing the unsafe block +and zero-initializing the buffer.