GHSA-JRF8-CMGG-GV2M
Vulnerability from github – Published: 2021-08-25 20:53 – Updated: 2023-06-13 20:29native_cpuid::cpuid_count() exposes the unsafe __cpuid_count() intrinsic from core::arch::x86 or core::arch::x86_64 as a safe function, and uses it internally, without checking the safety requirement:
- The CPU the program is currently running on supports the function being called.
CPUID is available in most, but not all, x86/x86_64 environments. The crate compiles only on these architectures, so others are unaffected. This issue is mitigated by the fact that affected programs are expected to crash deterministically every time.
The flaw has been fixed in v9.0.0, by intentionally breaking compilation when targeting SGX or 32-bit x86 without SSE. This covers all affected CPUs.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "raw-cpuid"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "9.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-26307"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-657"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-19T18:02:32Z",
"nvd_published_at": "2021-01-29T03:15:00Z",
"severity": "MODERATE"
},
"details": "native_cpuid::cpuid_count() exposes the unsafe __cpuid_count() intrinsic from core::arch::x86 or core::arch::x86_64 as a safe function, and uses it internally, without checking the safety requirement:\n\n* The CPU the program is currently running on supports the function being called.\n\nCPUID is available in most, but not all, x86/x86_64 environments. The crate compiles only on these architectures, so others are unaffected. This issue is mitigated by the fact that affected programs are expected to crash deterministically every time.\n\nThe flaw has been fixed in v9.0.0, by intentionally breaking compilation when targeting SGX or 32-bit x86 without SSE. This covers all affected CPUs.",
"id": "GHSA-jrf8-cmgg-gv2m",
"modified": "2023-06-13T20:29:54Z",
"published": "2021-08-25T20:53:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-26307"
},
{
"type": "WEB",
"url": "https://github.com/gz/rust-cpuid/issues/40"
},
{
"type": "WEB",
"url": "https://github.com/gz/rust-cpuid/issues/41"
},
{
"type": "WEB",
"url": "https://github.com/RustSec/advisory-db/pull/614"
},
{
"type": "WEB",
"url": "https://github.com/gz/rust-cpuid/commit/91b676eecd01f2163e2984215e2c0ac89e30ce75"
},
{
"type": "PACKAGE",
"url": "https://github.com/gz/rust-cpuid"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2021-0013.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "Error on unsupported architectures in raw-cpuid"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.