Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | direct_ring_buffer (crates.io) | before 0.2.2 | 0.2.2 | Patch available | GHSA-fp5x-7m4q-449f |
- direct_ring_buffer (crates.io) Vendor— Affected before 0.2.2 Fixed in 0.2.2 Patch available GHSA-fp5x-7m4q-449f
Remediation
- Fix · GHSA-fp5x-7m4q-449f direct_ring_buffer (crates.io) Fixed in 0.2.2 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-fp5x-7m4q-449f
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences