Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. rust-i18n-support
  4. ›
  5. GHSA-c8v3-jhv9-4ppc

GHSA-c8v3-jhv9-4ppc: Use-after-free when setting the locale

January 23, 2024

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

  • github.com/advisories/GHSA-c8v3-jhv9-4ppc
  • github.com/longbridgeapp/rust-i18n
  • github.com/longbridgeapp/rust-i18n/commit/22e0609591a2c08930f52a0e6bc860f02a0e88c0
  • github.com/longbridgeapp/rust-i18n/issues/71
  • rustsec.org/advisories/RUSTSEC-2024-0007.html

Code Behaviors & Features

Detect and mitigate GHSA-c8v3-jhv9-4ppc with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.0 before 3.0.1

Fixed versions

  • 3.0.1

Solution

Upgrade to version 3.0.1 or above.

Weakness

  • CWE-416: Use After Free

Source file

cargo/rust-i18n-support/GHSA-c8v3-jhv9-4ppc.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:15 +0000.