CVE-2021-26307:
Error on unsupported architectures in raw-cpuid
5.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.15529%
CWE
Published
8/25/2021
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
raw-cpuid | rust | < 9.0.0 | 9.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from native_cpuid::cpuid_count() wrapping the unsafe __cpuid_count intrinsic from core::arch as a safe function. This violates Rust's safety requirements as it doesn't verify the CPU supports the CPUID instruction, which isn't available in all x86/x86_64 environments (e.g., SGX or 32-bit x86 without SSE). The CVE description explicitly identifies this function as problematic, and the fix involved adding compilation guards for affected architectures. While other functions had memory safety issues (fixed via #[repr(C)]), this function directly relates to the CVE-2021-26307 vulnerability through its unsafe exposure of CPU-dependent intrinsics.