Home » Database

AVID-2026-R0829

Description

Null pointer dereference and heap OOB read in TensorFlow (CVE-2021-37639)

Details

TensorFlow is an end-to-end open source platform for machine learning. When restoring tensors via raw APIs, if the tensor name is not provided, TensorFlow can be tricked into dereferencing a null pointer. Alternatively, attackers can read memory outside the bounds of heap allocated data by providing some tensor names but not enough for a successful restoration. The implementation retrieves the tensor list corresponding to the tensor_name user controlled input and immediately retrieves the tensor at the restoration index (controlled via preferred_shard argument). This occurs without validating that the provided list has enough values. If the list is empty this results in dereferencing a null pointer (undefined behavior). If, however, the list has some elements, if the restoration index is outside the bounds this results in heap OOB read. We have patched the issue in GitHub commit 9e82dce6e6bd1f36a57e08fa85af213e2b2f2622. 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-37639 describes a memory-safety vulnerability (null pointer dereference and heap out-of-bounds read) in TensorFlow, an AI framework. It directly concerns software used to build/train/deploy AI systems (TensorFlow), i.e., a component in the GP AI software stack. This is a security vulnerability with CVSS scores and a published advisory, providing sufficient evidence for inclusion in AVID curation. As it affects a widely-used AI framework, it has supply-chain implications for AI software stacks through dependency-risk and potential exploit paths in ML pipelines.

References

Affected or Relevant Artifacts

  • Developer: tensorflow
  • Deployer: tensorflow
  • Artifact Details:
TypeName
Systemtensorflow

Impact

AVID Taxonomy Categorization

  • Risk domains: Security
  • SEP subcategories: S0100: Software Vulnerability
  • Lifecycle stages: L06: Deployment

CVSS

Version3.1
Vector StringCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Base Score8.4
Base Severity🔴 High
Attack VectorLOCAL
Attack Complexity🟢 Low
Privileges RequiredNONE
User InteractionNONE
ScopeUNCHANGED
Confidentiality Impact🔴 High
Integrity Impact🔴 High
Availability Impact🔴 High

CWE

IDDescription
CWE-476CWE-476: NULL Pointer Dereference

Other information

  • Report Type: Advisory
  • Credits:
  • Date Reported: 2021-08-12
  • Version: 0.3.3
  • AVID Entry