GHSA-fp5x-7m4q-449f: Direct ring buffer Direct Ring Buffer Has Uninitialized Vulnerability

LOW
CWE-908
Published
Advisory Summary

GHSA-fp5x-7m4q-449f is a LOW direct ring buffer has uninitialized vulnerability (CWE-908: Use of Uninitialized Resource) affecting Direct ring buffer libraries in the crates.io ecosystem. The issue involves direct ring buffer has uninitialized memory exposure in create_ring_buffer. Remediation is available by upgrading affected packages to version 0.2.2.

GHSA-fp5x-7m4q-449f at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-fp5x-7m4q-449f
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-908: Use of Uninitialized Resource
Affected Product Direct ring buffer
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-fp5x-7m4q-449f

To remediate this vulnerability, upgrade all affected Direct ring buffer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

direct_ring_buffer fixed: 0.2.2
Upgrade direct_ring_buffer to 0.2.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for direct_ring_buffer

How to Check if You Are Affected

To determine whether your application is affected by GHSA-fp5x-7m4q-449f, inspect your project dependencies for Direct ring buffer:

inspect dependencies for direct_ring_buffer

Analyze the terminal output to locate any version of Direct ring buffer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-908: Use of Uninitialized Resource, where the product uses or accesses a resource that has not been initialized. In Direct ring buffer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-fp5x-7m4q-449f Affected Direct ring buffer Versions

1 component(s)
Fixed Versions:
0.2.2
Product / Package Ecosystem Affected Versions Fixed Version
direct_ring_buffer
crates.io
< 0.2.2
0.2.2

References

Frequently Asked Questions

What is GHSA-fp5x-7m4q-449f?
GHSA-fp5x-7m4q-449f is a security vulnerability in Direct ring buffer involving Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer under CWE-908: Use of Uninitialized Resource.
Which Direct ring buffer versions are affected?
Affected versions include releases prior to 0.2.2 across affected packages: direct_ring_buffer.
What version fixes GHSA-fp5x-7m4q-449f?
Upgrading to 0.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is direct_ring_buffer affected?
Yes, direct_ring_buffer is affected in releases prior to 0.2.2. Upgrade your dependency to 0.2.2 or later.
What CWE is associated with GHSA-fp5x-7m4q-449f?
GHSA-fp5x-7m4q-449f is classified under CWE-908: Use of Uninitialized Resource (The product uses or accesses a resource that has not been initialized.).
How can I check crates.io dependencies for GHSA-fp5x-7m4q-449f?
Run the dependency tree command: 'inspect dependencies for direct_ring_buffer'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fp5x-7m4q-449f",
  "modified" : "2025-10-21T21:57:32Z",
  "published" : "2025-10-21T21:57:31Z",
  "aliases" : [ ],
  "summary" : "Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer",
  "details" : "The safe function `create_ring_buffer` allocates a buffer using `Vec::with_capacity` followed by `set_len`, creating a `Box<[T]>` containing uninitialized memory.\n\nThis 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.\n\nFixed 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "direct_ring_buffer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ain1084/direct_ring_buffer/issues/1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ain1084/direct_ring_buffer/pull/2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ain1084/direct_ring_buffer"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0105.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-908" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-21T21:57:31Z",
    "nvd_published_at" : null
  }
}