GHSA-3hxh-7jxm-59x4: Metrics util AtomicBucket<T> Unconditionally Implements Send/Sync Vulnerability
MODERATEGHSA-3hxh-7jxm-59x4 is a MODERATE atomicbucket<t> unconditionally implements send/sync vulnerability (General Security Weakness) affecting Metrics util libraries in the crates.io ecosystem. The issue involves atomicbucket<t> unconditionally implements send/sync. Remediation is available by upgrading affected packages to version 0.7.0.
GHSA-3hxh-7jxm-59x4 at a Glance
How to Fix GHSA-3hxh-7jxm-59x4
To remediate this vulnerability, upgrade all affected Metrics util 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 metrics-util to 0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for metrics-util
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3hxh-7jxm-59x4, inspect your project dependencies for Metrics util:
inspect dependencies for metrics-util
Analyze the terminal output to locate any version of Metrics util in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), 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 General Security Weakness. In Metrics util, 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-3hxh-7jxm-59x4 Affected Metrics util Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
metrics-util
|
crates.io |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is GHSA-3hxh-7jxm-59x4?
Which Metrics util versions are affected?
What version fixes GHSA-3hxh-7jxm-59x4?
Is metrics-util affected?
What CWE is associated with GHSA-3hxh-7jxm-59x4?
How can I check crates.io dependencies for GHSA-3hxh-7jxm-59x4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3hxh-7jxm-59x4",
"modified" : "2022-06-17T00:13:03Z",
"published" : "2022-06-17T00:13:03Z",
"aliases" : [ ],
"summary" : "AtomicBucket<T> unconditionally implements Send/Sync",
"details" : "In the affected versions of the crate, `AtomicBucket<T>` unconditionally implements `Send`/`Sync` traits. Therefore, users can create a data race to the inner\n`T: !Sync` by using the `AtomicBucket::data_with()` API.\nSuch data races can potentially cause memory corruption or other undefined behavior.\n\nThe flaw was fixed in commit 8e6daab by adding appropriate Send/Sync bounds to the Send/Sync impl of struct `Block<T>` (which is a data type contained inside `AtomicBucket<T>`).\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "metrics-util"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/metrics-rs/metrics/issues/190"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/metrics-rs/metrics"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0113.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:13:03Z",
"nvd_published_at" : null
}
}