Advisory

GHSA-pfr9-2p92-qrhq

Also known as: RUSTSEC-2024-0377

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.

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-10-09 14:34 UTC
Modified
2026-05-20 01:00 UTC

Affected packages and fixes

dbn

crates.io · All systems

Affected

  • introduced 0, fixed 0.22.1 (semver)

Fixed versions

0.22.1

Fix

  • Fixed version 0.22.1
    cargo update -p dbn --precise 0.22.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences