GHSA-fp5x-7m4q-449f
LOWDirect Ring Buffer has uninitialized memory exposure in create_ring_buffer
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.
- Published
- 21 Oct 2025
- Last modified
- 28 Oct 2025
- Weakness
- CWE-908
- Also known as
- RUSTSEC-2025-0105
- Sources
- OSVJSONOSV RUSTSEC-2025-0105JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | direct_ring_buffer | < 0.2.2 | 0.2.2 |
| OSV | crates.io | direct_ring_buffer | >= 0.0.0-0, < 0.2.2 | 0.2.2 |
References
- https://github.com/ain1084/direct_ring_buffer/issues/1 · WEB, REPORT
- https://github.com/ain1084/direct_ring_buffer/pull/2 · WEB
- https://github.com/ain1084/direct_ring_buffer · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2025-0105.html · WEB, ADVISORY
- https://crates.io/crates/direct_ring_buffer · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Oct 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Oct 2025)