GHSA-pfr9-2p92-qrhq
medium
Databento Binary Encoding (DBN) has a heap buffer overflow using c_chars_to_str function
- Severity
- medium CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2024-0377
Description
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.
If 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dbn (crates.io) | before 0.22.1, from 0.0.0-0 before 0.22.1-0 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | medium CVSS:4.0 | 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 |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-pfr9-2p92-qrhq changed 2026-05-20 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2024-0377 changed 2025-10-28 | CC0-1.0 |