RUSTSEC-2024-0007

Source
https://rustsec.org/advisories/RUSTSEC-2024-0007
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2024-0007.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2024-0007
Aliases
Published
2024-01-19T12:00:00Z
Modified
2024-02-10T16:26:48.561050Z
Summary
Use-after-free when setting the locale
Details

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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / rust-i18n-support

Package

Name
rust-i18n-support
View open source insights on deps.dev
Purl
pkg:cargo/rust-i18n-support

Affected ranges

Type
SEMVER
Events
Introduced
3.0.0
Fixed
3.0.1

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "rust_i18n_support::AtomicStr::as_str"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": "unsound",
    "categories": [
        "memory-exposure"
    ]
}