{"id":"GHSA-fp5x-7m4q-449f","aliases":["RUSTSEC-2025-0105"],"status":"published","title":"Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer","description":"The safe function `create_ring_buffer` allocates a buffer using `Vec::with_capacity` followed by `set_len`, creating a `Box\u003c[T]\u003e` containing uninitialized memory.\n\nThis leads to undefined behavior when functions like `write_slices` create typed slices (e.g., `\u0026mut [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":{"version":"4.0","score":2,"vector":"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","level":"low","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-908"],"published":"2025-10-21T12:00:00Z","modified":"2025-10-28T06:29:24Z","fixes":[{"ecosystem":"crates.io","package":"direct_ring_buffer","fixed_in":["0.2.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"direct_ring_buffer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"direct_ring_buffer","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.2.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"direct_ring_buffer","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.2.2"}]}]}],"references":[{"url":"https://github.com/ain1084/direct_ring_buffer/issues/1","tags":["web","report"]},{"url":"https://github.com/ain1084/direct_ring_buffer/pull/2","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0105.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-fp5x-7m4q-449f"},{"url":"https://github.com/ain1084/direct_ring_buffer","tags":["package"]},{"url":"https://crates.io/crates/direct_ring_buffer","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-fp5x-7m4q-449f","title":"Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer","description":"The safe function `create_ring_buffer` allocates a buffer using `Vec::with_capacity` followed by `set_len`, creating a `Box\u003c[T]\u003e` containing uninitialized memory.\n\nThis leads to undefined behavior when functions like `write_slices` create typed slices (e.g., `\u0026mut [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.","status":"published","published":"2025-10-21T21:57:31Z","modified":"2025-10-21T21:57:32Z","cvss":[{"version":"4.0","score":2,"vector":"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","level":"low"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T14:39:02.474737Z"}],"osv":[{"id":"GHSA-fp5x-7m4q-449f","title":"Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer","description":"The safe function `create_ring_buffer` allocates a buffer using `Vec::with_capacity` followed by `set_len`, creating a `Box\u003c[T]\u003e` containing uninitialized memory.\n\nThis leads to undefined behavior when functions like `write_slices` create typed slices (e.g., `\u0026mut [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.","status":"published","published":"2025-10-21T21:57:31Z","modified":"2025-10-28T06:29:24.396422Z","cvss":[{"version":"4.0","score":2,"vector":"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","level":"low"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T15:46:46.760785Z"},{"id":"RUSTSEC-2025-0105","title":"Uninitialized memory exposure in create_ring_buffer","description":"The safe function `create_ring_buffer` allocates a buffer using `Vec::with_capacity` followed by `set_len`, creating a `Box\u003c[T]\u003e` containing uninitialized memory.\n\nThis leads to undefined behavior when functions like `write_slices` create typed slices (e.g., `\u0026mut [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.","status":"published","published":"2025-10-21T12:00:00Z","modified":"2025-10-28T06:29:24.396422Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
