GHSA-6692-8qqf-79jc: `Read` on uninitialized buffer may cause UB ('tectonic_xdv' crate)
N/A
CVSS Score
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
-
Published
6/17/2022
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
-
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| tectonic_xdv | rust | < 0.1.12 | 0.1.12 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the buffer initialization pattern shown in the commit diff. The original code used Vec::with_capacity() + unsafe set_len() to create an uninitialized buffer, which was then passed to Read::read(). This matches the exact scenario described in the advisory - passing uninitialized buffers to user-provided Read implementations. The fixed commit replaced this with vec![0; BUF_SIZE], proving the vulnerable code was in this specific function. The XdvParser::process method is clearly identified as the location where the unsafe buffer handling occurred before the patch.