{"answers":{"affected":"1 open source package ship an affected version, including mutringbuf.","exploited":"There is no known exploitation of RUSTSEC-2026-0142 in the wild and no public exploit code.","fix":"No fix has been published for RUSTSEC-2026-0142 yet. Limit exposure of the affected software until one is available.","what":"RUSTSEC-2026-0142 is an use after free vulnerability in mutringbuf, published on 14 May 2026."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0142 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0142 is an use after free vulnerability in mutringbuf, published on 14 May 2026. \nExploitation: There is no known exploitation of RUSTSEC-2026-0142 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mutringbuf (crates.io): affected from 0.0.0-0; no fix listed\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/RUSTSEC-2026-0142/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0142/index.md)","id":"RUSTSEC-2026-0142","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0142/index.md","name":"RUSTSEC-2026-0142","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service","code_execution"],"network_reachable":"unknown","non_default_config":true,"product_category":"Rust ring buffer library","requires_auth":"none","summary":"A double-free vulnerability in the vmem feature of mutringbuf allows attackers to cause denial of service or potentially execute code via safe Rust APIs.","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":"`mutringbuf` is the archived predecessor of [`oneringbuf`](https://crates.io/crates/oneringbuf) — the crate was renamed and the GitHub repository was archived on 2025-11-20. All released versions up to `1.0.0` carry the same `vmem`-feature double-free bug that affects `oneringbuf`, with the same code paths and the same reproduction shape.\n\nWhen the `vmem` feature is enabled, `VmemStorage\u003cT\u003e::new(Box\u003c[UnsafeSyncCell\u003cT\u003e]\u003e)` (and every public constructor that funnels through it) bit-copies the input buffer into a freshly `mmap`'d region with `ptr::copy_nonoverlapping`, then lets the source `Box\u003c[UnsafeSyncCell\u003cT\u003e]\u003e` drop normally. Because `UnsafeSyncCell\u003cT\u003e` has a `Drop` impl that runs `assume_init_drop` on its inner `MaybeUninit\u003cT\u003e`, the source-side `T` values are dropped at the end of `new`, while bitwise duplicates remain inside the mmap region. The ring-buffer destructor then runs `UnsafeSyncCell::drop` a second time on every cell — a deterministic double-free of every heap-owning element. Reachable from 100% safe Rust.\n\n## Trigger\n\n```rust\nlet v: Vec\u003cVec\u003cu32\u003e\u003e = (0..1024).map(|i| vec![i, i+1, i+2]).collect();\nlet rb: mutringbuf::SharedVmemRB\u003cVec\u003cu32\u003e\u003e = mutringbuf::SharedVmemRB::from(v);\ndrop(rb);\n// glibc: free(): double free detected in tcache 2 -\u003e abort\n```\n\n## Fix\n\n`mutringbuf` is no longer maintained. The author renamed the crate to [`oneringbuf`](https://crates.io/crates/oneringbuf) and shipped the fix as `oneringbuf 0.7.1` (upstream PR [skilvingr/rust-oneringbuf#3](https://github.com/skilvingr/rust-oneringbuf/pull/3)). All `mutringbuf` versions have been yanked from crates.io. Users should migrate to `oneringbuf \u003e= 0.7.1`.\n\nSee the parallel advisory for the `oneringbuf` crate for the full technical write-up of the bug.","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":false,"headline":"Double-free in `vmem` storage reachable from safe Rust (predecessor of `oneringbuf`)","id":"RUSTSEC-2026-0142","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"use_after_free","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":[],"introduced":["0.0.0-0"],"last_affected":[],"package":"mutringbuf","purl":"pkg:cargo/mutringbuf","source":"RUSTSEC-2026-0142"}],"products":null,"published":"2026-05-14","related":[],"sources":[{"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 double-free vulnerability in the vmem feature of mutringbuf allows attackers to cause denial of service or potentially execute code via safe Rust APIs.","url":"https://insights.sbomify.com/RUSTSEC-2026-0142/"}