AVID-2026-R0840
Description
Segfault and heap buffer overflow in {Experimental,}DatasetToTFRecord in TensorFlow (CVE-2021-37650)
Details
TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation for tf.raw_ops.ExperimentalDatasetToTFRecord and tf.raw_ops.DatasetToTFRecord can trigger heap buffer overflow and segmentation fault. The implementation assumes that all records in the dataset are of string type. However, there is no check for that, and the example given above uses numeric types. We have patched the issue in GitHub commit e0b6e58c328059829c3eb968136f17aa72b6c876. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
Reason for inclusion in AVID: CVE-2021-37650 describes a heap buffer overflow and segmentation fault in TensorFlow’s DatasetToTFRecord operations, a core data pipeline component used in ML training and data processing. This is a software vulnerability in a general-purpose AI framework (TensorFlow) that can affect AI software stacks and pipelines. It is AI-related, impacts the software supply chain (dependencies used to build/train/deploy AI systems), constitutes a security/safety vulnerability, and the report provides explicit evidence (CVE id, affected versions, and fix).
References
- NVD entry
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-f8h4-7rgh-q2gm
- https://github.com/tensorflow/tensorflow/commit/e0b6e58c328059829c3eb968136f17aa72b6c876
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:H/I:H/A:H |
| Base Score | 7.8 |
| Base Severity | 🔴 High |
| Attack Vector | LOCAL |
| Attack Complexity | 🟢 Low |
| Privileges Required | 🟢 Low |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | 🔴 High |
| Integrity Impact | 🔴 High |
| Availability Impact | 🔴 High |
CWE
| ID | Description |
|---|---|
| CWE-120 | CWE-120: Buffer Copy without Checking Size of Input (‘Classic Buffer Overflow’) |
Other information
- Report Type: Advisory
- Credits:
- Date Reported: 2021-08-12
- Version: 0.3.3
- AVID Entry