Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. dbn
  4. ›
  5. GHSA-pfr9-2p92-qrhq

GHSA-pfr9-2p92-qrhq: Databento Binary Encoding (DBN) has a heap buffer overflow using c_chars_to_str function

October 9, 2024 (updated May 20, 2026)

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.

References

  • github.com/advisories/GHSA-pfr9-2p92-qrhq
  • github.com/databento/dbn/commit/339efb90fdb980920a5e8829008abc1114f4bfdd
  • github.com/databento/dbn/issues/67
  • rustsec.org/advisories/RUSTSEC-2024-0377.html

Code Behaviors & Features

Detect and mitigate GHSA-pfr9-2p92-qrhq with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.22.1

Fixed versions

  • 0.22.1

Solution

Upgrade to version 0.22.1 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-126: Buffer Over-read

Source file

cargo/dbn/GHSA-pfr9-2p92-qrhq.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:16 +0000.