GHSA-c8v3-jhv9-4ppc json
Use-after-free when setting the locale
published 2y ago modified 2y ago also RUSTSEC-2024-0007
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io rust-i18n-support 3.0.1
Is GHSA-c8v3-jhv9-4ppc in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | rust-i18n-support | >=3.0.0, <3.0.1 |
3.0.1 |
Classification
- Weakness
-
- CWE-416 Use After Free
References
-
github.com
/longbridgeapp/rust-i18n/commit/22e0609591a2c08930f52a0e6bc860f02a0e88c0
web
-
github.com
/longbridgeapp/rust-i18n/pull/72
web
-
github.com
/longbridgeapp/rust-i18n/issues/71
web, report
-
github.com
/longbridgeapp/rust-i18n
package
-
rustsec.org
/advisories/RUSTSEC-2024-0007.html
web, advisory
-
crates.io
/crates/rust-i18n-support
package
-
github.com
/longbridgeapp/rust-i18n/releases/tag/v3.0.1
web
Sources
- GitHub Advisory GHSA-c8v3-jhv9-4ppc
- OSV RUSTSEC-2024-0007
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.