CVE-2021-29614: Interpreter crash from `tf.io.decode_raw`
7.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.0254%
CWE
Published
5/21/2021
Updated
11/13/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
tensorflow | pip | < 2.1.4 | 2.1.4 |
tensorflow | pip | >= 2.2.0, < 2.2.3 | 2.2.3 |
tensorflow | pip | >= 2.3.0, < 2.3.3 | 2.3.3 |
tensorflow | pip | >= 2.4.0, < 2.4.2 | 2.4.2 |
tensorflow-cpu | pip | < 2.1.4 | 2.1.4 |
tensorflow-cpu | pip | >= 2.2.0, < 2.2.3 | 2.2.3 |
tensorflow-cpu | pip | >= 2.3.0, < 2.3.3 | 2.3.3 |
tensorflow-cpu | pip | >= 2.4.0, < 2.4.2 | 2.4.2 |
tensorflow-gpu | pip | < 2.1.4 | 2.1.4 |
tensorflow-gpu | pip | >= 2.2.0, < 2.2.3 | 2.2.3 |
tensorflow-gpu | pip | >= 2.3.0, < 2.3.3 | 2.3.3 |
tensorflow-gpu | pip | >= 2.4.0, < 2.4.2 | 2.4.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from incorrect pointer arithmetic in the reencoding loop of DecodePaddedRawOp::Compute. The code calculates 'width = fixed_length / sizeof(T)' but then advances the output pointer by 'fixed_length' raw bytes instead of 'width' elements. This mismatch causes the pointer to advance sizeof(T) times further than intended, leading to buffer overflow. The patch explicitly changes 'fixed_length' to 'width' in pointer advancement, confirming this as the root cause. The function's direct manipulation of memory buffers and pointer arithmetic makes it the clear vulnerable component.