Skip to content
Fencer Intel
low —

GHSA-fp5x-7m4q-449f json

Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer

published last yr. modified last yr. also RUSTSEC-2025-0105

cvss
—
not scored
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

The safe function `create_ring_buffer` allocates a buffer using `Vec::with_capacity` followed by `set_len`, creating a `Box<[T]>` containing uninitialized memory.

This leads to undefined behavior when functions like `write_slices` create typed slices (e.g., `&mut [bool]`) over the uninitialized memory, violating Rust's validity invariants. The issue has been confirmed using Miri.

Fixed in version 0.2.2 by using `resize_with` to properly initialize the buffer with `T::default()`, adding a `T: Default` bound to ensure sound initialization.

Patch / fix

  • crates.io direct_ring_buffer 0.2.2

Is GHSA-fp5x-7m4q-449f in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Affected packages

ecosystem package affected fixed in
crates.io direct_ring_buffer
<0.2.2
>=0.0.0-0, <0.2.2
0.2.2

Classification

Weakness
  • CWE-908 Use of Uninitialized Resource

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.