// For flags

CVE-2021-37690

Use after free and segfault in shape inference functions in TensorFlow

Severity Score

6.6
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

TensorFlow is an end-to-end open source platform for machine learning. In affected versions when running shape functions, some functions (such as `MutableHashTableShape`) produce extra output information in the form of a `ShapeAndType` struct. The shapes embedded in this struct are owned by an inference context that is cleaned up almost immediately; if the upstream code attempts to access this shape information, it can trigger a segfault. `ShapeRefiner` is mitigating this for normal output shapes by cloning them (and thus putting the newly created shape under ownership of an inference context that will not die), but we were not doing the same for shapes and types. This commit fixes that by doing similar logic on output shapes and types. We have patched the issue in GitHub commit ee119d4a498979525046fba1c3dd3f13a039fbb1. 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.

TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático. En las versiones afectadas cuando se ejecutan funciones de forma, algunas funciones (como "MutableHashTableShape") producen información de salida adicional en forma de una estructura" ShapeAndType". Las formas insertadas en esta estructura pertenecen a un contexto de inferencia que se limpia casi de inmediato; si el código ascendente intenta acceder a esta información de forma, puede desencadenar un fallo de segmento. "ShapeRefiner" está mitigando esto para las formas de salida normales al clonarlas (y así poner la forma recién creada bajo la propiedad de un contexto de inferencia que no morirá), pero no estábamos haciendo lo mismo para las formas y los tipos. Este commit corrige eso al hacer una lógica similar en formas y tipos de salida. Hemos solucionado el problema en el commit de GitHub ee119d4a498979525046fba1c3dd3f13a039fbb1. La corrección será incluida en TensorFlow versión 2.6.0. También seleccionaremos este commit en TensorFlow versión 2.5.1, TensorFlow versión 2.4.3 y TensorFlow versión 2.3.4, ya que estos también están afectados y aún se encuentran en el rango admitido.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-07-29 CVE Reserved
  • 2021-08-12 CVE Published
  • 2023-03-08 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-416: Use After Free
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.3.0 < 2.3.4
Search vendor "Google" for product "Tensorflow" and version " >= 2.3.0 < 2.3.4"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
>= 2.4.0 < 2.4.3
Search vendor "Google" for product "Tensorflow" and version " >= 2.4.0 < 2.4.3"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.5.0
Search vendor "Google" for product "Tensorflow" and version "2.5.0"
-
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.6.0
Search vendor "Google" for product "Tensorflow" and version "2.6.0"
rc0
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.6.0
Search vendor "Google" for product "Tensorflow" and version "2.6.0"
rc1
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
2.6.0
Search vendor "Google" for product "Tensorflow" and version "2.6.0"
rc2
Affected