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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| metrics-util (crates.io) | before 0.7.0, from 0.0.0-0 before 0.7.0 | GitHub Advisory Database, RustSec Advisory Database |
| metrics-util_project metrics-util | before 0.7.0 | NVD |
All scores
| GitHub | medium rating | |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV: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
| https://rustsec.org/advisories/RUSTSEC-2021-0113.html | advisory, third-party-advisory, web | |
| https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/metrics-util/RUSTSEC-2021-0113.md | third-party-advisory, web | |
| https://github.com/metrics-rs/metrics/issues/190 | report, web | |
| https://github.com/metrics-rs/metrics | package | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-45704 | advisory | |
| https://github.com/metrics-rs/metrics/commit/8e6daab | web | |
| https://crates.io/crates/metrics-util | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-45704 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3hxh-7jxm-59x4 changed 2023-11-08 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-cwvc-87xq-pc5m changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0113 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2021-45704 changed 2026-06-17 | Public domain |