CVE-2021-37681: TensorFlow SVDF Null Pointer Error
Summary
CVE-2021-37681: Null pointer exception in TensorFlow Lite. 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-37681 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 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, certain versions of TensorFlow are vulnerable to a null pointer error in the implementation of SVDF in TFLite.
Vulnerability Detail
The vulnerability arises from a null pointer error in the SVDF implementation of TFLite. The GetVariableInput function can return a null pointer, but the GetTensorData function assumes that the argument is always a valid tensor. Additionally, the expression tensor->is_variable can trigger a null pointer exception. This vulnerability can lead to crashes or potentially allow an attacker to execute arbitrary code. The issue has been patched in the latest GitHub commit and will be included in upcoming TensorFlow releases.
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.
Conclusion
The vulnerability in TensorFlow's SVDF implementation can lead to crashes or potential code execution. It is recommended to update TensorFlow to the latest patched version to mitigate the vulnerability. For further support on vulnerability remediation, 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 building and deploying machine learning models.
SVDF stands for Singular Value Decomposition Factorization and is a technique used in TensorFlow for modeling sequential data.
This vulnerability can lead to crashes or potentially allow an attacker to execute arbitrary code.
Versions 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, 2.5.0, 2.6.0-rc0, 2.6.0-rc1, and 2.6.0-rc2 are affected by this vulnerability.
To fix the vulnerability, update TensorFlow to the latest patched version (2.6.0 or the backported versions).
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.