{"answers":{"affected":"3 open source packages ship an affected version, including oneringbuf.","exploited":"There is no known exploitation of GHSA-q95x-7g78-rccv in the wild and no public exploit code.","fix":"Upgrade oneringbuf to 0.8.0 or later.","what":"GHSA-q95x-7g78-rccv is an use after free vulnerability in oneringbuf, published on 27 May 2026."},"fix_prompt":"Check this codebase for GHSA-q95x-7g78-rccv and fix it if it is affected.\n\nWhat it is: GHSA-q95x-7g78-rccv is an use after free vulnerability in oneringbuf, published on 27 May 2026. \nExploitation: There is no known exploitation of GHSA-q95x-7g78-rccv in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- oneringbuf (crates.io): affected all versions; fixed in 0.8.0\n- oneringbuf (crates.io): affected all versions; fixed in 0.8.0\n- oneringbuf (crates.io): affected from 0.0.0-0; fixed in 0.8.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-q95x-7g78-rccv/ (Markdown: https://insights.sbomify.com/GHSA-q95x-7g78-rccv/index.md)","id":"GHSA-q95x-7g78-rccv","markdown":"https://insights.sbomify.com/GHSA-q95x-7g78-rccv/index.md","name":"GHSA-q95x-7g78-rccv","record":{"aliases":["RUSTSEC-2026-0152"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust ring buffer library","requires_auth":"none","summary":"A use-after-free vulnerability in the oneringbuf Rust library allows attackers to execute arbitrary code or cause denial of service via unsafe cloning of ring buffer references.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"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::\u003cusize\u003e::from(vec![1, 2, 3]);\n\n    let r = \u003cLocalHeapRB\u003cusize\u003e as IntoRef\u003e::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```","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Use-after-free","id":"GHSA-q95x-7g78-rccv","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"use_after_free","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.8.0"],"introduced":["0"],"last_affected":[],"package":"oneringbuf","purl":null,"source":"GHSA-q95x-7g78-rccv"},{"ecosystem":"crates.io","fixed":["0.8.0"],"introduced":["0"],"last_affected":[],"package":"oneringbuf","purl":"pkg:cargo/oneringbuf","source":"GHSA-q95x-7g78-rccv"},{"ecosystem":"crates.io","fixed":["0.8.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"oneringbuf","purl":"pkg:cargo/oneringbuf","source":"RUSTSEC-2026-0152"}],"products":null,"published":"2026-05-27","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A use-after-free vulnerability in the oneringbuf Rust library allows attackers to execute arbitrary code or cause denial of service via unsafe cloning of ring buffer references.","url":"https://insights.sbomify.com/GHSA-q95x-7g78-rccv/"}