CVE-2021-29588: Division by zero in TFLite's implementation of `TransposeConv`
Impact The optimized implementation of the TransposeConv TFLite operator is vulnerable to a division by zero error:
cc int heightcol = (height + padt + padb - filterh) / strideh + 1; int widthcol = (width + padl + padr - filterw) / stridew + 1;
An attacker can craft a model such that stride{h,w} values are 0. Code calling this function must validate these arguments.
Patches We have patched the issue in GitHub commit 801c1c6be5324219689c98e1bd3e0ca365ee834d.
The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.
For more information Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
Attribution This vulnerability has been reported by members of the Aivul Team from Qihoo 360.
Other sources
TensorFlow is an end-to-end open source platform for machine learning. The optimized implementation of the TransposeConv TFLite operator is vulnerable to a division by zero error. An attacker can craft a model such that stride{h,w} values are 0. Code calling this function must validate these arguments. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the impact of CVE-2021-29588?
CVE-2021-29588 is a vulnerability in the TransposeConv TFLite operator that can lead to a division by zero error.
What versions are affected by CVE-2021-29588?
CVE-2021-29588 affects TensorFlow versions 2.4.0 to 2.4.2, 2.3.0 to 2.3.3, 2.2.0 to 2.2.3, and 2.1.0 to 2.1.4 for both tensorflow-gpu and tensorflow-cpu.
How do I fix CVE-2021-29588?
To mitigate CVE-2021-29588, upgrade TensorFlow to version 2.4.2 or later.
What is the severity of CVE-2021-29588?
CVE-2021-29588 is classified as a moderate severity vulnerability due to the potential for runtime errors but limited impact.
Is there a workaround for CVE-2021-29588?
There are no official workarounds for CVE-2021-29588, so the best course of action is to upgrade to a patched version.