CVE-2022-23578: TensorFlow Memory Leak in ImmutableExecutorState::Initialize
Summary
CVE-2022-23578: Memory leak in Tensorflow. Affects tensorflow across 3 version ranges.
< 2.5.3
>= 2.6.0, < 2.6.3
>= 2.7.0, < 2.7.1
Fixed in 2.5.3, 2.6.3 or 2.7.1, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow · PyPI
- tensorflow-gpu · PyPI
- tensorflow-cpu · PyPI
The same CVE-2022-23578 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 machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. This vulnerability affects versions 2.5.2 to 2.6.2 and 2.7.0 of TensorFlow.
Vulnerability Detail
The vulnerability in TensorFlow resides in the implementation of ImmutableExecutorState::Initialize. When a graph node is invalid, TensorFlow can leak memory. Specifically, if item->kernel is set to nullptr, which is a simple OpKernel* pointer, the previously allocated memory for it will not be properly released, resulting in a memory leak. This vulnerability can potentially lead to memory exhaustion and impact the stability and performance of TensorFlow applications.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.5.32.5.3 -
>= 2.6.0, < 2.6.32.6.3 -
>= 2.7.0, < 2.7.12.7.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. The recommended solution is to upgrade TensorFlow to the patched version as mentioned in the 'how_to_fix' section.
Conclusion
The vulnerability in TensorFlow that causes memory leaks in the ImmutableExecutorState::Initialize implementation has been addressed in TensorFlow 2.8.0. Users are advised to upgrade their installations to the patched version or update to the respective patched versions for TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models.
This vulnerability can lead to memory leaks in TensorFlow, potentially causing memory exhaustion and impacting the stability and performance of TensorFlow applications.
Versions 2.5.2 to 2.6.2 and 2.7.0 of TensorFlow are affected by this vulnerability.
To fix this vulnerability, users should upgrade their TensorFlow installations to version 2.8.0 or later. Alternatively, they can update to the patched versions for TensorFlow 2.7.1, TensorFlow 2.6.3, or TensorFlow 2.5.3.
No specific workaround is provided for this vulnerability. Upgrading to the patched versions is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.