CVE-2022-29198: TensorFlow - Denial of Service Vulnerability
Summary
CVE-2022-29198: Missing validation causes denial of service in TensorFlow via SparseTensorToCSRSparseMatrix. Affects tensorflow across 2 version ranges.
< 2.6.4
>= 2.7.0, < 2.7.2
Fixed in 2.6.4 or 2.7.2, depending on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · PyPI
The same CVE-2022-29198 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. It supports both deep learning and traditional machine learning algorithms, making it a versatile framework for building and training models. However, prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, TensorFlow is vulnerable to a denial of service attack due to a flaw in the implementation of tf.raw_ops.SparseTensorToCSRSparseMatrix.
Vulnerability Detail
The vulnerability arises from the lack of input validation in the tf.raw_ops.SparseTensorToCSRSparseMatrix function. This function assumes that the dense_shape argument is a vector and the indices argument is a matrix, as required for sparse tensors. However, there is no validation for these assumptions. An attacker can exploit this vulnerability by providing malicious input that violates these assumptions, leading to a CHECK-failure and triggering a denial of service attack. The impact of this vulnerability can be significant, as it can disrupt the availability of TensorFlow-based applications and services.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.6.42.6.4 -
>= 2.7.0, < 2.7.22.7.2
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. It is recommended to follow the steps mentioned in the 'how_to_fix' section to update TensorFlow to a patched version.
Conclusion
The vulnerability in TensorFlow's tf.raw_ops.SparseTensorToCSRSparseMatrix function can be exploited to trigger a denial of service attack. It is crucial to update TensorFlow to a patched version to mitigate this vulnerability. Regularly checking for updates and promptly applying them is essential to ensure the security and stability of TensorFlow-based applications and services. 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, widely used for developing and deploying machine learning models.
This vulnerability can be exploited to trigger a denial of service attack, potentially disrupting the availability of TensorFlow-based applications and services.
Versions prior to 2.9.0, 2.8.1, 2.7.2, and 2.6.4 are affected by this vulnerability.
To fix this vulnerability, update TensorFlow to versions 2.9.0, 2.8.1, 2.7.2, or 2.6.4, which contain a patch for this issue.
No specific workaround is provided for this vulnerability. It is recommended to update TensorFlow to a patched version.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.