// For flags

CVE-2020-15212

Out of bounds access in tensorflow-lite

Severity Score

8.6
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger writes outside of bounds of heap allocated buffers by inserting negative elements in the segment ids tensor. Users having access to `segment_ids_data` can alter `output_index` and then write to outside of `output_data` buffer. This might result in a segmentation fault but it can also be used to further corrupt the memory and can be chained with other vulnerabilities to create more advanced exploits. The issue is patched in commit 204945b19e44b57906c9344c0d00120eeeae178a and is released in TensorFlow versions 2.2.1, or 2.3.1. A potential workaround would be to add a custom `Verifier` to the model loading code to ensure that the segment ids are all positive, although this only handles the case when the segment ids are stored statically in the model. A similar validation could be done if the segment ids are generated at runtime between inference steps. If the segment ids are generated as outputs of a tensor during inference steps, then there are no possible workaround and users are advised to upgrade to patched code.

En TensorFlow Lite versiones anteriores a 2.2.1 y 2.3.1, los modelos que utilizan la suma de segmentos pueden activar escrituras fuera de límites de los búferes asignados de la pila insertando elementos negativos en el tensor de los ids de segmento. Los usuarios que tienen acceso a "segment_ids_data" pueden alterar "output_index" y luego escribir fuera del búfer de "output_data". Esto podría resultar en un fallo de segmentación, pero también se puede usar para corromper aún más la memoria y se puede encadenar con otras vulnerabilidades para crear explotaciones más avanzadas. El problema es parcheado en el commit 204945b19e44b57906c9344c0d00120eeeae178a y es publicado en TensorFlow versiones 2.2.1 o 2.3.1. Una solución alternativa potencial sería agregar un "Verifier" personalizado al código de carga del modelo para asegurar que los ids de segmento sean todos positivos, aunque esto solo maneja el caso cuando los ids de segmento son almacenados estáticamente en el modelo. Una comprobación similar podría ser realizada si los ids de segmento se generan en el tiempo de ejecución entre los pasos de inferencia. Si los ids de segmento son generados como salidas de un tensor durante los pasos de inferencia, entonces no existe una posible solución alternativa y se recomienda a los usuarios actualizar al código parcheado

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
High
Attack Vector
Network
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
  • 2020-06-25 CVE Reserved
  • 2020-09-25 CVE Published
  • 2023-05-02 EPSS Updated
  • 2024-08-04 CVE Updated
  • 2024-08-04 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • 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.2.0 < 2.2.1
Search vendor "Google" for product "Tensorflow" and version " >= 2.2.0 < 2.2.1"
lite
Affected
Google
Search vendor "Google"
Tensorflow
Search vendor "Google" for product "Tensorflow"
>= 2.3.0 < 2.3.1
Search vendor "Google" for product "Tensorflow" and version " >= 2.3.0 < 2.3.1"
lite
Affected