// For flags

CVE-2022-29210

Heap buffer overflow due to incorrect hash function in TensorFlow

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

TensorFlow es una plataforma de código abierto para el aprendizaje automático. En la versión 2.8.0, la función hash "TensorKey" usaba el total estimado de "AllocatedBytes()", que (a) es una estimación por tensor, y (b) es una función hash muy pobre para constantes (por ejemplo, "int32_t"). También intentó acceder a bytes individuales del tensor mediante "tensor.data()" de tamaño "AllocatedBytes()". Esto conllevaba a fallos de ASAN porque "AllocatedBytes()" es una estimación del total de bytes asignados por un tensor, incluyendo cualquier construcción apuntada (por ejemplo, cadenas), y no es referido a bytes contiguos en el buffer ".data()". Los detectores no podían usar este vector de bytes de todos modos porque tipos como "tstring" incluyen punteros, mientras que ellos necesitaban hacer un hash de los valores de las cadenas por sí mismos. Este problema está parcheado en Tensorflow versiones 2.9.0 y 2.8.1

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-04-13 CVE Reserved
  • 2022-05-20 CVE Published
  • 2023-08-25 EPSS Updated
  • 2024-08-03 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
  • CWE-122: Heap-based Buffer Overflow
  • CWE-787: Out-of-bounds Write
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.8.0
Search vendor "Google" for product "Tensorflow" and version "2.8.0"
-
Affected