Race Condition Affecting metrics-util package, versions <0.7.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.77% (55th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-METRICSUTIL-1655560
  • published20 Sept 2021
  • disclosed7 Apr 2021
  • creditUnknown

Introduced: 7 Apr 2021

CVE-2021-45704  (opens in a new tab)
CWE-362  (opens in a new tab)

How to fix?

Upgrade metrics-util to version 0.7.0 or higher.

Overview

metrics-util is a package of helper types/functions used by the metrics ecosystem.

Affected versions of this package are vulnerable to Race Condition. 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.

CVSS Base Scores

version 3.1