CVE-2021-41224: TensorFlow - Heap Out-of-Bounds Access in SparseFillEmptyRows
Summary
CVE-2021-41224: SparseFillEmptyRows heap OOB read. Affects tensorflow across 3 version ranges.
< 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-41224 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 domains, including research, industry, and academia. However, a vulnerability has been identified in TensorFlow that can lead to a heap out-of-bounds access when using the SparseFillEmptyRows implementation.
Vulnerability Detail
The vulnerability occurs when the size of the indices parameter does not match the size of the values parameter in the SparseFillEmptyRows function. This mismatch triggers a heap out-of-bounds access, potentially leading to memory corruption and arbitrary code execution. The issue affects versions of TensorFlow up to 2.6.0. Exploiting this vulnerability could allow an attacker to execute malicious code or cause a denial-of-service condition.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 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 known workaround for this vulnerability. It is recommended to apply the provided fix by updating to the latest version of TensorFlow.
Conclusion
The vulnerability in TensorFlow's SparseFillEmptyRows function can lead to a heap out-of-bounds access, potentially resulting in memory corruption and arbitrary code execution. Users are advised to update their TensorFlow installation to the fixed versions or apply the provided fix. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open source platform for machine learning that provides tools and libraries for developing and deploying machine learning models.
This vulnerability can lead to a heap out-of-bounds access, potentially resulting in memory corruption and arbitrary code execution. Exploiting this vulnerability could allow an attacker to execute malicious code or cause a denial-of-service condition.
The vulnerability affects TensorFlow versions up to 2.6.0. The fix has been applied in TensorFlow 2.7.0 and backported to TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4.
There is no known workaround for this vulnerability. It is recommended to update to the fixed versions of TensorFlow.
For more information about this vulnerability, you can refer to the official TensorFlow documentation or contact the TensorFlow development team.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.