PT-2020-14282 · Google+1 · Tensorflow Lite+1

Published

2020-09-25

·

Updated

2024-03-06

·

CVE-2020-15211

CVSS v4.0

6.3

Medium

VectorAV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions TensorFlow Lite versions prior to 1.15.4 TensorFlow Lite versions prior to 2.0.3 TensorFlow Lite versions prior to 2.1.2 TensorFlow Lite versions prior to 2.2.1 TensorFlow Lite versions prior to 2.3.1
Description The issue arises from the use of a double indexing scheme in saved models in the flatbuffer format. This scheme allows for a pattern of double array indexing when trying to get the data of each tensor. However, the use of a negative -1 value as an index for optional tensors results in special casing during validation at model loading time. This special casing allows the -1 index to be a valid tensor index for any operator, including those that don't expect optional inputs and including for output tensors. As a result, this allows writing and reading from outside the bounds of heap allocated arrays, although only at a specific offset from the start of these arrays. This results in both read and write gadgets, albeit very limited in scope.
Recommendations For versions prior to 1.15.4, upgrade to version 1.15.4 or later. For versions prior to 2.0.3, upgrade to version 2.0.3 or later. For versions prior to 2.1.2, upgrade to version 2.1.2 or later. For versions prior to 2.2.1, upgrade to version 2.2.1 or later. For versions prior to 2.3.1, upgrade to version 2.3.1 or later. As a temporary workaround, consider adding a custom Verifier to the model loading code to ensure that only operators which accept optional inputs use the -1 special value and only for the tensors that they expect to be optional.

Exploit

Fix

Memory Corruption

Out of bounds Read

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BIT-TENSORFLOW-2020-15211
CVE-2020-15211
GHSA-CVPC-8PHH-8F45
OPENSUSE-SU-2020:1766-1
OPENSUSE-SU-2020_1766-1
PYSEC-2020-134
PYSEC-2020-291
PYSEC-2020-326

Affected Products

Suse
Tensorflow Lite