From 627aa62572e9515bbff7b3504cb69d41aa61d190 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 21 Jul 2024 13:26:54 -0400 Subject: [PATCH] Added advisory for undefined behavior in openssl (#2021) --- crates/openssl/RUSTSEC-0000-0000.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crates/openssl/RUSTSEC-0000-0000.md diff --git a/crates/openssl/RUSTSEC-0000-0000.md b/crates/openssl/RUSTSEC-0000-0000.md new file mode 100644 index 00000000..54aeb02b --- /dev/null +++ b/crates/openssl/RUSTSEC-0000-0000.md @@ -0,0 +1,17 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "openssl" +date = "2024-07-21" +url = "https://github.com/sfackler/rust-openssl/pull/2266" + +[affected] +functions = { "openssl::bio::MemBio::get_buf" = ["< 0.10.66, >=0.8.0"] } + +[versions] +patched = [">= 0.10.66"] +``` + +# `MemBio::get_buf` has undefined behavior with empty buffers + +Previously, `MemBio::get_buf` called `slice::from_raw_parts` with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.