{"id":"GHSA-pfr9-2p92-qrhq","summary":"Databento Binary Encoding (DBN) has a heap buffer overflow using c_chars_to_str function","details":"The `heap-buffer-overflow` is triggered in the `strlen()` function when handling the `c_chars_to_str` function in the dbn crate. This vulnerability occurs because the `CStr::from_ptr()` function in Rust assumes that the provided C string is null-terminated. However, there is no guarantee that the input chars array passed to the c_chars_to_str function is properly null-terminated.\n\nIf the chars array does not contain a null byte (\\0), strlen() will continue to read beyond the bounds of the buffer in search of a null terminator. This results in an out-of-bounds memory read and can lead to a heap-buffer-overflow, potentially causing memory corruption or exposing sensitive information.","aliases":["RUSTSEC-2024-0377"],"modified":"2026-05-20T01:00:15.746612546Z","published":"2024-10-09T14:34:24Z","database_specific":{"cwe_ids":["CWE-126"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2024-10-09T14:34:24Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/databento/dbn/issues/67"},{"type":"WEB","url":"https://github.com/databento/dbn/commit/339efb90fdb980920a5e8829008abc1114f4bfdd"},{"type":"PACKAGE","url":"https://github.com/databento/dbn"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2024-0377.html"}],"affected":[{"package":{"name":"dbn","ecosystem":"crates.io","purl":"pkg:cargo/dbn"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.22.1"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.22.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/10/GHSA-pfr9-2p92-qrhq/GHSA-pfr9-2p92-qrhq.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}