{"id":"GHSA-q445-7m23-qrmw","aliases":["RUSTSEC-2024-0357"],"status":"published","title":"openssl's `MemBio::get_buf` has undefined behavior with empty buffers","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.","severity":{"version":"4.0","score":6.9,"vector":"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","level":"medium","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-476"],"published":"2024-07-21T12:00:00Z","modified":"2026-09-10T03:50:16Z","fixes":[{"ecosystem":"crates.io","package":"openssl","fixed_in":["0.10.66"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"openssl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.10.66"}]}]},{"source":"osv","ecosystem":"crates.io","package":"openssl","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.10.66"}]}]},{"source":"osv","ecosystem":"crates.io","package":"openssl","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.10.66"}]}]}],"references":[{"url":"https://github.com/sfackler/rust-openssl/pull/2266","tags":["web"]},{"url":"https://github.com/sfackler/rust-openssl/commit/aef36e0f3950653148d6644309ee41ccf16e02bb","tags":["web"]},{"url":"https://github.com/sfackler/rust-openssl/releases/tag/openssl-v0.10.66","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0357.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-q445-7m23-qrmw"},{"url":"https://github.com/sfackler/rust-openssl","tags":["package"]},{"url":"https://crates.io/crates/openssl","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-q445-7m23-qrmw","title":"openssl's `MemBio::get_buf` has undefined behavior with empty buffers","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.\n","status":"published","published":"2024-07-22T17:34:53Z","modified":"2024-08-01T05:06:45Z","cvss":[{"version":"4.0","score":6.9,"vector":"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","level":"medium"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L","level":"medium"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:37:57.422393Z"}],"osv":[{"id":"GHSA-q445-7m23-qrmw","title":"openssl's `MemBio::get_buf` has undefined behavior with empty buffers","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.\n","status":"published","published":"2024-07-22T17:34:53Z","modified":"2026-09-10T03:50:16.826604285Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L","level":"medium"},{"version":"4.0","score":6.9,"vector":"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","level":"medium"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T15:46:54.055966Z"},{"id":"RUSTSEC-2024-0357","title":"`MemBio::get_buf` has undefined behavior with empty buffers","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.","status":"published","published":"2024-07-21T12:00:00Z","modified":"2025-10-28T06:29:25.883814Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
