CVE-2022-29208: Segfault and OOB write due to incomplete validation in `EditDistance` in TensorFlow
7.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.31172%
CWE
Published
5/24/2022
Updated
1/30/2023
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.6.4 | 2.6.4 |
| tensorflow | pip | >= 2.7.0, < 2.7.2 | 2.7.2 |
| tensorflow | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow-cpu | pip | < 2.6.4 | 2.6.4 |
| tensorflow-cpu | pip | >= 2.7.0, < 2.7.2 | 2.7.2 |
| tensorflow-cpu | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow-gpu | pip | < 2.6.4 | 2.6.4 |
| tensorflow-gpu | pip | >= 2.7.0, < 2.7.2 | 2.7.2 |
| tensorflow-gpu | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from multiple instances in EditDistanceOp::Compute where std::inner_product calculates a 'loc' index for tensor writes. The original validation (OP_REQUIRES) only checked against the upper bound of the output buffer. The patch explicitly adds 0 <= loc validation in 5 locations in edit_distance_op.cc, confirming these were the vulnerable code paths. The CVE description explicitly references this pattern of missing negative index validation in write operations.