GHSA-q95x-7g78-rccv: Oneringbuf OneRingBuf Has A Use After Vulnerability
MODERATEGHSA-q95x-7g78-rccv is a MODERATE oneringbuf has a use after vulnerability (CWE-416: Use After Free) affecting Oneringbuf libraries in the crates.io ecosystem. The issue involves oneringbuf has a use after free vulnerability. Remediation is available by upgrading affected packages to version 0.8.0.
GHSA-q95x-7g78-rccv at a Glance
How to Fix GHSA-q95x-7g78-rccv
To remediate this vulnerability, upgrade all affected Oneringbuf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade oneringbuf to 0.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for oneringbuf
How to Check if You Are Affected
To determine whether your application is affected by GHSA-q95x-7g78-rccv, inspect your project dependencies for Oneringbuf:
inspect dependencies for oneringbuf
Analyze the terminal output to locate any version of Oneringbuf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.0), 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-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In Oneringbuf, 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
GHSA-q95x-7g78-rccv Affected Oneringbuf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
oneringbuf
|
crates.io |
< 0.8.0
|
0.8.0
|
References
Frequently Asked Questions
What is GHSA-q95x-7g78-rccv?
Which Oneringbuf versions are affected?
What version fixes GHSA-q95x-7g78-rccv?
Is oneringbuf affected?
What CWE is associated with GHSA-q95x-7g78-rccv?
How can I check crates.io dependencies for GHSA-q95x-7g78-rccv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q95x-7g78-rccv",
"modified" : "2026-07-08T20:26:23Z",
"published" : "2026-07-08T20:26:23Z",
"aliases" : [ ],
"summary" : "OneRingBuf has a Use After Free Vulnerability",
"details" : "Affected versions of `oneringbuf` exposed the obsolete `IntoRef::into_ref` method through the public `IntoRef` trait. For heap-backed ring buffers, this method returned a `DroppableRef` handle.\n\n`DroppableRef` stored an owning raw pointer created from `Box::into_raw`. Its `Clone` implementation copied this raw pointer without incrementing the internal `alive_iters` counter. Internally, this clone pattern appears to rely on a fixed number of handles being created to match the initial `alive_iters` value. However, exposing `DroppableRef` through the public `IntoRef::TargetRef` associated type allows safe external code to create additional clones beyond that fixed count, breaking the lifetime protocol. `Drop` later dereferenced the pointer and could free the backing allocation with `Box::from_raw`.\n\nSafe code could call `IntoRef::into_ref` to obtain a `DroppableRef` and then clone it. Each clone pointed to the same allocation, but the internal `alive_iters` counter was not increased. As a result, one clone could free the allocation while another clone still existed. Dropping the remaining clone then accessed freed memory, causing a heap-use-after-free.\n\nThe issue was fixed in version 0.8.0 by removing the obsolete `into_ref` method.\n\n## Trigger\n\n```rust\nuse oneringbuf::{IntoRef, LocalHeapRB};\n\nfn main() {\n let rb = LocalHeapRB::<usize>::from(vec![1, 2, 3]);\n\n let r = <LocalHeapRB<usize> as IntoRef>::into_ref(rb);\n let r2 = r.clone();\n let r3 = r.clone();\n\n drop(r);\n drop(r2);\n drop(r3); // AddressSanitizer: heap-use-after-free\n}\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "oneringbuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/skilvingr/rust-oneringbuf/commit/643a24b30914068416dff9021a069c12c865a316"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Skilvingr/rust-oneringbuf"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2026-0152.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-416" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-08T20:26:23Z",
"nvd_published_at" : null
}
}