CVE-2021-29598: TensorFlow SVDF Operator Division by Zero Vulnerability
Summary
CVE-2021-29598: Division by zero in TFLite's implementation of SVDF. Affects tensorflow across 4 version ranges.
< 2.1.4
>= 2.2.0, < 2.2.3
>= 2.3.0, < 2.3.3
>= 2.4.0, < 2.4.2
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
The same CVE-2021-29598 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
TensorFlow is an end-to-end open source platform for machine learning. It provides a comprehensive ecosystem for developing and deploying machine learning models. The SVDF (Singular Value Decomposition Filter) operator is a component of TensorFlow that is used for processing sequential data. It is vulnerable to a division by zero error, which can be exploited by an attacker to cause a denial of service or potentially execute arbitrary code.
Vulnerability Detail
The vulnerability in the SVDF TFLite operator arises from a lack of proper input validation. An attacker can craft a malicious model in such a way that the params->rank parameter is set to zero, triggering a division by zero error. This can lead to a crash or unexpected behavior in the TensorFlow runtime. The impact of this vulnerability can range from a denial of service to potential code execution, depending on the context in which TensorFlow is being used.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.1.42.1.4 -
>= 2.2.0, < 2.2.32.2.3 -
>= 2.3.0, < 2.3.32.3.3 -
>= 2.4.0, < 2.4.22.4.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the available fixes as mentioned in the 'how_to_fix' section.
Conclusion
The TensorFlow SVDF operator division by zero vulnerability can be mitigated by upgrading to the fixed versions or applying the available patches. It is important to keep TensorFlow and other dependencies up to date to ensure the security of machine learning models. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open source platform for machine learning that provides a comprehensive ecosystem for developing and deploying machine learning models.
The SVDF (Singular Value Decomposition Filter) operator is a component of TensorFlow used for processing sequential data.
The impact of this vulnerability can range from a denial of service to potential code execution, depending on the context in which TensorFlow is being used.
The vulnerability can be fixed by upgrading to TensorFlow 2.5.0 or later. Alternatively, users of affected versions can update to the respective fixed versions (TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3, or TensorFlow 2.1.4).
There is no known workaround for this vulnerability. It is recommended to apply the available fixes as mentioned in the 'how_to_fix' section.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.