GHSA-9hpw-r23r-xgm5: Thread local Data Race Vulnerability
HIGHGHSA-9hpw-r23r-xgm5 is a HIGH data race vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Thread local libraries in the crates.io ecosystem. The issue involves data race in `iter` and `itermut`. Remediation is available by upgrading affected packages to version 1.1.4.
GHSA-9hpw-r23r-xgm5 at a Glance
How to Fix GHSA-9hpw-r23r-xgm5
To remediate this vulnerability, upgrade all affected Thread local dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade thread_local to 1.1.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for thread_local
How to Check if You Are Affected
To determine whether your application is affected by GHSA-9hpw-r23r-xgm5, inspect your project dependencies for Thread local:
inspect dependencies for thread_local
Analyze the terminal output to locate any version of Thread local in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Thread local, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-9hpw-r23r-xgm5 Affected Thread local Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
thread_local
|
crates.io |
< 1.1.4
|
1.1.4
|
References
Frequently Asked Questions
What is GHSA-9hpw-r23r-xgm5?
Which Thread local versions are affected?
What version fixes GHSA-9hpw-r23r-xgm5?
Is thread_local affected?
What CWE is associated with GHSA-9hpw-r23r-xgm5?
How can I check crates.io dependencies for GHSA-9hpw-r23r-xgm5?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9hpw-r23r-xgm5",
"modified" : "2022-06-17T00:25:46Z",
"published" : "2022-06-17T00:25:46Z",
"aliases" : [ ],
"summary" : "Data race in `Iter` and `IterMut`",
"details" : "In the affected version of this crate, `{Iter, IterMut}::next` used a weaker memory ordering when loading values than what was required, exposing a potential data race\nwhen iterating over a `ThreadLocal`'s values.\n\nCrates using `Iter::next`, or `IterMut::next` are affected by this issue.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "thread_local"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Amanieu/thread_local-rs/issues/33"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Amanieu/thread_local-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2022-0006.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:25:46Z",
"nvd_published_at" : null
}
}