{"id":"GHSA-c8v3-jhv9-4ppc","aliases":["RUSTSEC-2024-0007"],"status":"published","title":"Use-after-free when setting the locale","description":"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\u003cString\u003e`. The locale can be read with `AtomicStr::as_str()`. `AtomicStr::as_str()` does not increment the usage counter of the `Arc`.\n\nIf the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2024-01-19T12:00:00Z","modified":"2024-02-10T16:26:48Z","fixes":[{"ecosystem":"crates.io","package":"rust-i18n-support","fixed_in":["3.0.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"rust-i18n-support","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.0.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rust-i18n-support","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.0.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rust-i18n-support","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.0.1"}]}]}],"references":[{"url":"https://github.com/longbridgeapp/rust-i18n/issues/71","tags":["web","report"]},{"url":"https://github.com/longbridgeapp/rust-i18n/commit/22e0609591a2c08930f52a0e6bc860f02a0e88c0","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0007.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-c8v3-jhv9-4ppc"},{"url":"https://github.com/longbridgeapp/rust-i18n","tags":["package"]},{"url":"https://crates.io/crates/rust-i18n-support","tags":["package"]},{"url":"https://github.com/longbridgeapp/rust-i18n/pull/72","tags":["web"]},{"url":"https://github.com/longbridgeapp/rust-i18n/releases/tag/v3.0.1","tags":["web"]}],"sources":{"ghsa":[{"id":"GHSA-c8v3-jhv9-4ppc","title":"Use-after-free when setting the locale","description":"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\u003cString\u003e`. The locale can be read with `AtomicStr::as_str()`. `AtomicStr::as_str()` does not increment the usage counter of the `Arc`.\n\nIf the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.\n","status":"published","published":"2024-01-23T20:10:48Z","modified":"2024-01-23T20:10:50Z","cwes":["CWE-416"],"updated_at":"2026-11-02T14:37:32.302254Z"}],"osv":[{"id":"GHSA-c8v3-jhv9-4ppc","title":"Use-after-free when setting the locale","description":"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\u003cString\u003e`. The locale can be read with `AtomicStr::as_str()`. `AtomicStr::as_str()` does not increment the usage counter of the `Arc`.\n\nIf the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.\n","status":"published","published":"2024-01-23T20:10:48Z","modified":"2024-02-10T16:26:48.56105Z","cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:44.927642Z"},{"id":"RUSTSEC-2024-0007","title":"Use-after-free when setting the locale","description":"Version 3.0.0 introduced an `AtomicStr` type, that is used to store the current locale.\nIt stores the locale as a raw pointer to an `Arc\u003cString\u003e`.\nThe locale can be read with `AtomicStr::as_str()`.\n`AtomicStr::as_str()` does not increment the usage counter of the `Arc`.\n\nIf the locale is changed in one thread, another thread can have a stale -- possibly already freed --\nreference to the stored string.","status":"published","published":"2024-01-19T12:00:00Z","modified":"2024-02-10T16:26:48.56105Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
