CVE-2022-41902: Out of bounds write in grappler in Tensorflow
7.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.48151%
CWE
Published
11/21/2022
Updated
9/18/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| tensorflow | pip | < 2.8.4 | 2.8.4 |
| tensorflow | pip | >= 2.9.0, < 2.9.3 | 2.9.3 |
| tensorflow | pip | >= 2.10.0, < 2.10.1 | 2.10.1 |
| tensorflow-cpu | pip | < 2.8.4 | 2.8.4 |
| tensorflow-gpu | pip | < 2.8.4 | 2.8.4 |
| tensorflow-cpu | pip | >= 2.9.0, < 2.9.3 | 2.9.3 |
| tensorflow-gpu | pip | >= 2.9.0, < 2.9.3 | 2.9.3 |
| tensorflow-cpu | pip | >= 2.10.0, < 2.10.1 | 2.10.1 |
| tensorflow-gpu | pip | >= 2.10.0, < 2.10.1 | 2.10.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from MakeGrapplerFunctionItem's handling of function argument attributes. The commit diff shows a critical bounds check was added for attr.first before accessing arg_attr.at(attr.first). Without this check, invalid attribute indices would trigger an out-of-bounds write in the std::vector<const FunctionDef::ArgAttrs*> arg_attr container. This matches the CWE-787 (OOB Write) and CWE-125 (OOB Read) descriptions in the advisory. The function's role in processing TensorFlow function definitions makes it a clear candidate for the vulnerability described.