CVE-2021-45689: Use of Uninitialized Resource in gfx-auxil
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.61972%
CWE
Published
1/6/2022
Updated
6/22/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
gfx-auxil | rust | <= 0.10.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the read_spirv function's unsafe usage pattern where an uninitialized buffer is passed to a Read implementation. The code uses Vec::with_capacity followed by unsafe pointer manipulation to create a byte slice without initializing memory first. This directly matches the CWE-908 description of using uninitialized resources and aligns with the advisory's specific mention of gfx_auxil::read_spirv as the problematic function. The GitHub issue analysis confirms this pattern and its security implications.