Skip to content

Commit b8a143b

Browse files
1 parent 8dce4e7 commit b8a143b

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-fp5x-7m4q-449f",
4+
"modified": "2025-10-21T21:57:32Z",
5+
"published": "2025-10-21T21:57:31Z",
6+
"aliases": [],
7+
"summary": "Direct Ring Buffer has uninitialized memory exposure in create_ring_buffer",
8+
"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.",
9+
"severity": [
10+
{
11+
"type": "CVSS_V4",
12+
"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"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "crates.io",
19+
"name": "direct_ring_buffer"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "0.2.2"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/ain1084/direct_ring_buffer/issues/1"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/ain1084/direct_ring_buffer/pull/2"
44+
},
45+
{
46+
"type": "PACKAGE",
47+
"url": "https://github.com/ain1084/direct_ring_buffer"
48+
},
49+
{
50+
"type": "WEB",
51+
"url": "https://rustsec.org/advisories/RUSTSEC-2025-0105.html"
52+
}
53+
],
54+
"database_specific": {
55+
"cwe_ids": [
56+
"CWE-908"
57+
],
58+
"severity": "LOW",
59+
"github_reviewed": true,
60+
"github_reviewed_at": "2025-10-21T21:57:31Z",
61+
"nvd_published_at": null
62+
}
63+
}

0 commit comments

Comments
 (0)