# GHSA-q445-7m23-qrmw: openssl's `MemBio::get_buf` has undefined behavior with empty buffers

- Severity: Medium (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-07-21T12:00:00.000Z
- Modified: 2026-09-10T03:50:16.826Z
- Also known as: RUSTSEC-2024-0357
- Weaknesses: CWE-476

## 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.

(As written by GitHub Advisory Database.)

## Affected

- openssl (crates.io): before 0.10.66; from 0.0.0-0 before 0.10.66

## Every score

- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`

## References

- <https://github.com/sfackler/rust-openssl/pull/2266> (web)
- <https://github.com/sfackler/rust-openssl/commit/aef36e0f3950653148d6644309ee41ccf16e02bb> (web)
- <https://github.com/sfackler/rust-openssl> (package)
- <https://github.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.66> (web)
- <https://rustsec.org/advisories/RUSTSEC-2024-0357.html> (advisory, web)
- <https://crates.io/crates/openssl> (package)

## Sources

- GitHub Advisory Database: [GHSA-q445-7m23-qrmw](https://github.com/advisories/GHSA-q445-7m23-qrmw), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2024-0357](https://rustsec.org/advisories/RUSTSEC-2024-0357.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-q445-7m23-qrmw · Whole record: https://cve.day/GHSA-q445-7m23-qrmw.json · Rebuilt by cve.day 2026-11-25T22:56:43.205Z
