RUSTSEC-2026-0143
Double-free in `vmem` storage reachable from safe Rust
Mitigation
- Upgrade oneringbuf to 0.7.1 or later.
Who should check
- Projects that depend on crates.io package oneringbuf (>= 0.0.0-0, < 0.7.1)
Vulnerability facts
- Affected
- oneringbuf >= 0.0.0-0, < 0.7.1
- Fixed in
- 0.7.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
When the `vmem` feature is enabled, `VmemStorage<T>::new(Box<[UnsafeSyncCell<T>]>)` (and every public constructor that funnels through it — `ConcurrentHeapRB::default(cap)`, `ConcurrentHeapRB::from(Vec<T>)`, `From<Box<[T]>>`, etc.) bit-copies the input buffer into a freshly `mmap`'d region with `ptr::copy_nonoverlapping`, then lets the source `Box<[UnsafeSyncCell<T>]>` drop normally. Because `UnsafeSyncCell<T>` has a `Drop` impl that runs `assume_init_drop` on its inner `MaybeUninit<T>`, the source-side `T` values are dropped at the end of `new`, while bitwise duplicates (carrying the same heap pointers for `String`, `Box`, `Vec`, `Arc`, …) remain inside the mmap region. When the ring buffer is later destructed, the destructor's `drop_in_place` over the slice runs `UnsafeSyncCell::drop` a second time on every cell — a deterministic double-free of every heap-owning element. Reachable from 100% safe Rust. ## Trigger ```rust let v: Vec<Vec<u32>> = (0..1024).map(|i| vec![i, i+1, i+2]).collect(); let rb: oneringbuf::SharedVmemRB<Vec<u32>> = oneringbuf::SharedVmemRB::from(v); drop(rb); // glibc: free(): double free detected in tcache 2 -> abort // ASan: AddressSanitizer: attempting double-free ``` Any `T` with a non-trivial `Drop` reproduces deterministically. ## Fix Fixed in `0.7.1` via upstream PR [skilvingr/rust-oneringbuf#3](https://github.com/skilvingr/rust-oneringbuf/pull/3), which deallocates the source `Box<[UnsafeSyncCell<T>]>` without running per-element `Drop` after the bytes have been copied into the mmap region. Vulnerable versions (`< 0.7.1`) have been yanked from crates.io.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io oneringbuf | >= 0.0.0-0, < 0.7.1 | 0.7.1 | osv |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by RUSTSEC-2026-0143. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/RUSTSEC-2026-0143.md Affected: oneringbuf >= 0.0.0-0, < 0.7.1 Fixed in: 0.7.1 Steps: 1. Search this machine and project for oneringbuf (crates.io): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is RUSTSEC-2026-0143 being exploited?
There is no confirmed exploitation: RUSTSEC-2026-0143 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is RUSTSEC-2026-0143?
It has no CVSS score yet. Unknown.
Which versions are affected by RUSTSEC-2026-0143?
oneringbuf >= 0.0.0-0, < 0.7.1.
Is there a fix for RUSTSEC-2026-0143?
Yes. Fixed in 0.7.1. Upgrade oneringbuf to 0.7.1 or later.
How do I check if I'm affected by RUSTSEC-2026-0143?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.