PT-2021-18356 · Google · Tensorflow
Mihaimaruseac
·
Published
2021-05-14
·
Updated
2024-03-06
·
CVE-2021-29605
CVSS v3.1
7.1
High
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
TensorFlow versions prior to 2.5.0
TensorFlow version 2.4.2
TensorFlow version 2.3.3
TensorFlow version 2.2.3
TensorFlow version 2.1.4
Description
The TFLite code for allocating
TFLiteIntArrays is vulnerable to an integer overflow issue. An attacker can craft a model such that the size multiplier is so large that the return value overflows the int datatype and becomes negative. This results in an invalid value being given to malloc. In this case, ret->size would dereference an invalid pointer.Recommendations
For TensorFlow versions prior to 2.5.0, update to version 2.5.0 or later.
For TensorFlow version 2.4.2, apply the patch from GitHub commit 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5.
For TensorFlow version 2.3.3, apply the patch from GitHub commit 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5.
For TensorFlow version 2.2.3, apply the patch from GitHub commit 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5.
For TensorFlow version 2.1.4, apply the patch from GitHub commit 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5.
As a temporary workaround, consider restricting the use of the
TfLiteIntArrayCreate function until a patch is available.Exploit
Fix
Integer Overflow
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Tensorflow