CVE-2021-41202: TensorFlow - Integer Overflow in tf.range Kernel
Summary
CVE-2021-41202: Overflow/crash in tf.range. Affects tensorflow across 3 version ranges.
>= 2.4.0, < 2.4.4
>= 2.5.0, < 2.5.2
>= 2.6.0, < 2.6.1
Fixed in 2.4.4, 2.5.2 or 2.6.1, depending 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-41202 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 open source platform for machine learning. It provides a comprehensive ecosystem of tools, libraries, and resources for developing and deploying machine learning models. TensorFlow is widely used in various industries and research fields for tasks such as image recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to integer overflow in the tf.range kernel.
Vulnerability Detail
The vulnerability arises from a conditional statement in the tf.range kernel that involves implicit type conversion. When calculating the size of the output, the conditional statement of type 'int64 = condition ? int64 : double' is used. Due to C++ implicit conversion rules, both branches of the condition will be cast to 'double' before truncation. This can result in overflows and potential security risks. The vulnerability affects versions 2.4.0 to 2.4.4, 2.5.0 to 2.5.2, 2.6.0 to 2.6.1, 2.7.0-rc0, and 2.7.0-rc1 of TensorFlow.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 2.4.0, < 2.4.42.4.4 -
>= 2.5.0, < 2.5.22.5.2 -
>= 2.6.0, < 2.6.12.6.1
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 specific workaround provided for this vulnerability. Users are recommended to update their TensorFlow installations to the patched versions as mentioned in the 'how_to_fix' section.
Conclusion
The vulnerability in TensorFlow can lead to integer overflow in the tf.range kernel, potentially posing security risks. It is crucial for users to update their TensorFlow installations to the latest patched versions to mitigate this vulnerability. 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 tools and resources for developing and deploying machine learning models.
The vulnerability can lead to integer overflow in the tf.range kernel, potentially resulting in security risks.
Versions 2.4.0 to 2.4.4, 2.5.0 to 2.5.2, 2.6.0 to 2.6.1, 2.7.0-rc0, and 2.7.0-rc1 of TensorFlow are affected.
Update your TensorFlow installation to the latest patched versions, including TensorFlow 2.7.0, TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4.
No specific workaround is provided. Updating to the patched versions is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.