Home » Database

AVID-2026-R1033

Description

Heap buffer overflow due to incorrect hash function in TensorFlow (CVE-2022-29210)

Details

TensorFlow is an open source platform for machine learning. In version 2.8.0, the TensorKey hash function used total estimated AllocatedBytes(), which (a) is an estimate per tensor, and (b) is a very poor hash function for constants (e.g. int32_t). It also tried to access individual tensor bytes through tensor.data() of size AllocatedBytes(). This led to ASAN failures because the AllocatedBytes() is an estimate of total bytes allocated by a tensor, including any pointed-to constructs (e.g. strings), and does not refer to contiguous bytes in the .data() buffer. The discoverers could not use this byte vector anyway because types such as tstring include pointers, whereas they needed to hash the string values themselves. This issue is patched in Tensorflow versions 2.9.0 and 2.8.1.

Reason for inclusion in AVID: The candidate describes a CVE in TensorFlow (a core ML framework) involving a heap buffer overflow in a component used for tensor hashing. This is a software vulnerability within an AI framework, affecting runtimes/dependencies used to build/train/deploy AI systems. It affects general-purpose AI software stacks; evidence includes affected versions and patches, signaling a vulnerability in the AI software supply chain.

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:L/UI:N/S:U/C:N/I:N/A:H
Base Score5.5
Base Severity🟠 Medium
Attack VectorLOCAL
Attack Complexity🟢 Low
Privileges Required🟢 Low
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactNONE
Integrity ImpactNONE
Availability Impact🔴 High

CWE

IDDescription
CWE-120CWE-120: Buffer Copy without Checking Size of Input (‘Classic Buffer Overflow’)
CWE-122CWE-122: Heap-based Buffer Overflow

Other information

  • Report Type: Advisory
  • Credits:
  • Date Reported: 2022-05-20
  • Version: 0.3.3
  • AVID Entry