CVE-2021-45704
JSON

8.1high

AtomicBucket<T> unconditionally implements Send/Sync

Severity
8.1high CVSS:3.1 by NVD
Exploit likelihood
0.77% (higher than 56% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-3hxh-7jxm-59x4GHSA-cwvc-87xq-pc5mRUSTSEC-2021-0113

Description

An issue was discovered in the metrics-util crate before 0.7.0 for Rust. There is a data race and memory corruption because AtomicBucket<T> unconditionally implements the Send and Sync traits.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
metrics-util (crates.io)before 0.7.0, from 0.0.0-0 before 0.7.0GitHub Advisory Database, RustSec Advisory Database
metrics-util_project metrics-utilbefore 0.7.0NVD

All scores

GitHubmedium rating
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

An issue was discovered in the metrics-util crate before 0.7.0 for Rust. There is a data race and memory corruption because AtomicBucket<T> unconditionally implements the Send and Sync traits.

GitHub Advisory Database

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>).

GitHub Advisory Database

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>).

NVD (es)

Se ha detectado un problema en la crate metrics-util versiones anteriores a 0.7.0 para Rust. Se presenta una carrera de datos y corrupción de memoria porque AtomicBucket(T) implementa incondicionalmente los rasgos Send y Sync

References

Sources

SourceRecordLicence
CVE ListCVE-2021-45704 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-3hxh-7jxm-59x4 changed 2023-11-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-cwvc-87xq-pc5m changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0113 changed 2023-11-08CC0-1.0
NVDCVE-2021-45704 changed 2026-06-17Public domain