GHSA-c8v3-jhv9-4ppc
MEDIUMUse-after-free when setting the locale
Version 3.0.0 introduced an AtomicStr type, that is used to store the current locale. It stores the locale as a raw pointer to an Arc<String>. The locale can be read with AtomicStr::as_str(). AtomicStr::as_str() does not increment the usage counter of the Arc.
If the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.
- Published
- 19 Jan 2024
- Last modified
- 10 Feb 2024
- Weakness
- CWE-416
- Also known as
- RUSTSEC-2024-0007
- Sources
- OSVJSONOSV RUSTSEC-2024-0007JSON
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | rust-i18n-support | >= 3.0.0, < 3.0.1 | 3.0.1 |
References
- https://github.com/longbridgeapp/rust-i18n/issues/71 · WEB, REPORT
- https://github.com/longbridgeapp/rust-i18n/commit/22e0609591a2c08930f52a0e6bc860f02a0e88c0 · WEB
- https://github.com/longbridgeapp/rust-i18n · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2024-0007.html · WEB, ADVISORY
- https://crates.io/crates/rust-i18n-support · PACKAGE
- https://github.com/longbridgeapp/rust-i18n/pull/72 · WEB
- https://github.com/longbridgeapp/rust-i18n/releases/tag/v3.0.1 · WEB
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 19 Jan 2024)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 23 Jan 2024)