CVE-2022-35983: TensorFlow vulnerable to `CHECK` fail in `Save` and `SaveSlices`
5.9
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.42671%
CWE
Published
9/16/2022
Updated
1/28/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| tensorflow | pip | < 2.7.2 | 2.7.2 |
| tensorflow | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow | pip | >= 2.9.0, < 2.9.1 | 2.9.1 |
| tensorflow-cpu | pip | < 2.7.2 | 2.7.2 |
| tensorflow-cpu | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow-cpu | pip | >= 2.9.0, < 2.9.1 | 2.9.1 |
| tensorflow-gpu | pip | < 2.7.2 | 2.7.2 |
| tensorflow-gpu | pip | >= 2.8.0, < 2.8.1 | 2.8.1 |
| tensorflow-gpu | pip | >= 2.9.0, < 2.9.1 | 2.9.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how TensorSliceWriter handled unsupported dtypes:
- MaxBytesPerElement contained a LOG(FATAL) assertion that would crash the process when encountering unsupported dtypes
- SaveData template function called MaxBytesPerElement without first validating dtype support
- The commit patched this by introducing MaxBytesPerElementOrZero for safe checking and converting fatal assertions to proper error handling
- Test cases added in the commit specifically target dtype validation failures
- The vulnerability manifests in Save/SaveSlices ops which ultimately call these internal implementation functions