Description
An issue was discovered in the spin crate before 0.5.2 for Rust, when RwLock is used. Because memory ordering is mishandled, two writers can acquire the lock at the same time, violating mutual exclusion.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rust-spin | 0.5.2-1 | — |
| Debian 13 | rust-spin | 0.5.2-1 | — |
| Debian 12 | rust-spin | 0.5.2-1 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| crates.io | spin | < 0.5.2 | 0.5.2 | GHSA-hv7x-f3pv-gpwr |
| crates.io | spin | >= 0.0.0-0, < 0.5.2 | 0.5.2 | RUSTSEC-2019-0013 |