CVE-2021-37689: TensorFlow - Null Pointer Dereference Denial of Service
Summary
CVE-2021-37689: Null pointer dereference in TensorFlow Lite MLIR optimizations. Affects tensorflow across 3 version ranges.
>= 2.3.0, < 2.3.4
>= 2.4.0, < 2.4.3
>= 2.5.0, < 2.5.1
Fixed in 2.3.4, 2.4.3 or 2.5.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-37689 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 of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various industries and research domains for tasks such as image recognition, natural language processing, and recommendation systems. However, a vulnerability has been discovered in TensorFlow that can lead to a null pointer dereference and subsequent denial of service.
Vulnerability Detail
The vulnerability in TensorFlow arises from the MLIR optimization of the L2NormalizeReduceAxis operator. An attacker can exploit this vulnerability by crafting a TFLite model that triggers a null pointer dereference. When the model is processed, the MLIR optimization unconditionally dereferences a pointer to an iterator to a vector without checking if the vector has any elements. This leads to a crash and denial of service. The impact of this vulnerability is the disruption of TensorFlow-based applications, potentially causing downtime and loss of service availability.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 2.3.0, < 2.3.42.3.4 -
>= 2.4.0, < 2.4.32.4.3 -
>= 2.5.0, < 2.5.12.5.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 mentioned for this vulnerability. The recommended approach is to apply the provided patches and update to the latest version of TensorFlow.
Conclusion
The discovered vulnerability in TensorFlow can lead to a null pointer dereference and denial of service. It is crucial to promptly update to the latest patched version of TensorFlow (2.6.0, 2.5.1, 2.4.3, or 2.3.4) to mitigate the risk. Regularly checking for updates and applying them is essential to ensure the security and stability of TensorFlow-based applications. 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 libraries for building and deploying machine learning models.
The vulnerability can lead to a null pointer dereference and denial of service, causing crashes and disruption of TensorFlow-based applications.
The vulnerability affects TensorFlow versions 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, 2.5.0, and 2.6.0-rc0 to 2.6.0-rc2.
To fix this vulnerability, update to the latest patched version of TensorFlow (2.6.0, 2.5.1, 2.4.3, or 2.3.4) by upgrading the TensorFlow package.
No specific workaround is mentioned. It is recommended to apply the provided patches and update to the latest version of TensorFlow.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.