AVID-2026-R0789
Description
Division by zero in padding computation in TFLite (CVE-2021-29585)
Details
TensorFlow is an end-to-end open source platform for machine learning. The TFLite computation for size of output after padding, ComputeOutSize(https://github.com/tensorflow/tensorflow/blob/0c9692ae7b1671c983569e5d3de5565843d500cf/tensorflow/lite/kernels/padding.h#L43-L55), does not check that the stride argument is not 0 before doing the division. Users can craft special models such that ComputeOutSize is called with stride set to 0. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.
Reason for inclusion in AVID: CVE-2021-29585 describes a divide-by-zero flaw in the TFLite padding computation within TensorFlow. This is a software vulnerability in a core AI framework/component used to build, train, and deploy ML/AI systems. It affects the software stack (TensorFlow/TFLite) rather than hardware/firmware, making it a software supply chain issue applicable to general-purpose AI systems. The CVE summary indicates a potential crash (division by zero) with a local, high-complexity exploit path, which constitutes a security/safety vulnerability signal. Sufficient evidence is provided in the report to classify it as an AI-related supply chain vulnerability in the AI software stack.
References
- NVD entry
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mv78-g7wq-mhp4
- https://github.com/tensorflow/tensorflow/commit/49847ae69a4e1a97ae7f2db5e217c77721e37948
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:H/PR:L/UI:N/S:U/C:N/I:N/A:L |
| Base Score | 2.5 |
| Base Severity | 🟢 Low |
| Attack Vector | LOCAL |
| Attack Complexity | 🔴 High |
| Privileges Required | 🟢 Low |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | 🟢 Low |
CWE
| ID | Description |
|---|---|
| CWE-369 | CWE-369: Divide By Zero |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2021-05-14
- Version: 0.3.3
- AVID Entry