AVID-2026-R0835
Description
Integer overflow due to conversion to unsigned in TensorFlow (CVE-2021-37645)
Details
TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation of tf.raw_ops.QuantizeAndDequantizeV4Grad is vulnerable to an integer overflow issue caused by converting a signed integer value to an unsigned one and then allocating memory based on this value. The implementation uses the axis value as the size argument to absl::InlinedVector constructor. But, the constructor uses an unsigned type for the argument, so the implicit conversion transforms the negative value to a large integer. We have patched the issue in GitHub commit 96f364a1ca3009f98980021c4b32be5fdcca33a1. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, and TensorFlow 2.4.3, as these are also affected and still in supported range.
Reason for inclusion in AVID: CVE-2021-37645 describes an integer overflow in TensorFlow (an AI framework) related to converting signed to unsigned values and allocating memory accordingly. This is a software vulnerability in a component (TensorFlow) that is commonly used to build, train, and deploy AI systems, affecting the AI software supply chain. The report provides concrete details, affected versions, and a patch reference, satisfying criteria for an AVID vulnerability in the AI software stack.
References
- NVD entry
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9w2p-5mgw-p94c
- https://github.com/tensorflow/tensorflow/commit/96f364a1ca3009f98980021c4b32be5fdcca33a1
Affected or Relevant Artifacts
- Developer: tensorflow
- Deployer: tensorflow
- Artifact Details:
| Type | Name |
|---|---|
| System | tensorflow |
Impact
AVID Taxonomy Categorization
- Risk domains: Security
- SEP subcategories: S0100: Software Vulnerability
- Lifecycle stages: L06: Deployment
CVSS
| Version | 3.1 |
| Vector String | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| Base Score | 5.5 |
| Base Severity | 🟠 Medium |
| Attack Vector | LOCAL |
| Attack Complexity | 🟢 Low |
| Privileges Required | 🟢 Low |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | 🔴 High |
CWE
| ID | Description |
|---|---|
| CWE-681 | CWE-681: Incorrect Conversion between Numeric Types |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2021-08-12
- Version: 0.3.3
- AVID Entry