GHSA-3hxh-7jxm-59x4: Metrics util AtomicBucket<T> Unconditionally Implements Send/Sync Vulnerability

MODERATE
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-3hxh-7jxm-59x4
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Metrics util
Package Ecosystem crates.io
Published Date
Last Updated

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.

metrics-util fixed: 0.7.0
Upgrade metrics-util to 0.7.0
Verify Direct and Transitive Dependencies

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

In the affected versions of the crate, `AtomicBucket<T>` unconditionally implements `Send`/`Sync` traits. Therefore, users can create a data race to the inner `T: !Sync` by using the `AtomicBucket::data_with()` API. Such data races can potentially cause memory corruption or other undefined behavior. The 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>`).

GHSA-3hxh-7jxm-59x4 Affected Metrics util Versions

1 component(s)
Fixed Versions:
0.7.0
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?
GHSA-3hxh-7jxm-59x4 is a security vulnerability in Metrics util involving AtomicBucket<T> unconditionally implements Send/Sync under General Security Weakness.
Which Metrics util versions are affected?
Affected versions include releases prior to 0.7.0 across affected packages: metrics-util.
What version fixes GHSA-3hxh-7jxm-59x4?
Upgrading to 0.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is metrics-util affected?
Yes, metrics-util is affected in releases prior to 0.7.0. Upgrade your dependency to 0.7.0 or later.
What CWE is associated with GHSA-3hxh-7jxm-59x4?
GHSA-3hxh-7jxm-59x4 is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-3hxh-7jxm-59x4?
Run the dependency tree command: 'inspect dependencies for metrics-util'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}