RUSTSEC-2026-0528 UB can be reached from safe code
Unknown
- Published
- Updated
- Exploit status
- No public exploit known
Description
The variance of RefSwap and OptionRefSwap were incorrect, possibly allowing use-after-free.
OptionRefSwap::into_inner did not check for null.
The fix is to make RefSwap and OptionRefSwap invariant, and to change OptionRefSwap::into_inner to return an option.
It is available in version 0.1.3.
If your project still compiles with 0.1.3 then it is not affected by the unsoundness on version 0.1.2
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io ref-swap(crates.io) | >= 0.0.0-0, < 0.1.3 | 0.1.3 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io ref-swap(crates.io) | >= 0.0.0-0, < 0.1.3 | 0.1.3 |
References
- crates.io product
- rustsec.org vendor-advisory
- github.com