GHSA-c8v3-jhv9-4ppc: Use-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 . The locale can be read with AtomicStr::asstr(). AtomicStr::asstr() 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 Jan 23, 2024
Affected packages
rust-i18n-support
- Ecosystem
- Rust (crates.io)
- Affected
- >= 3.0.0, < 3.0.1
- Fixed in
- 3.0.1
- Check
cargo tree -i rust-i18n-support
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
