Skip to content
OpenAdvisories
Medium · 6.5 GHSA-q445-7m23-qrmw RUSTSEC-2024-0357

openssl's `MemBio::get_buf` has undefined behavior with empty buffers

Published Jul 22, 2024 · Updated Sep 10, 2026 · Assigned by GHSA

Description

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.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io openssl < 0.10.66 0.10.66 GHSA-q445-7m23-qrmw
crates.io openssl >= 0.0.0-0, < 0.10.66 0.10.66 RUSTSEC-2024-0357

References