CVE-2021-29575: TensorFlow - Denial of Service Vulnerability
Summary
CVE-2021-29575: Overflow/denial of service in tf.raw_ops.ReverseSequence. Affects tensorflow across 4 version ranges.
< 2.1.5
>= 2.2.0, < 2.2.3
>= 2.3.0, < 2.3.3
>= 2.4.0, < 2.4.2
Fixed in 4 releases; the minimum fixed version depends 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-29575 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 developing and deploying machine learning models. TensorFlow is widely used in various industries and research domains.
Vulnerability Detail
The vulnerability identified as CVE-2021-29575 affects the implementation of tf.raw_ops.ReverseSequence in TensorFlow. This vulnerability allows for a stack overflow or denial of service (DoS) attack. The issue arises due to the lack of validation for the seq_dim and batch_dim arguments. Negative values for seq_dim can lead to stack overflow or CHECK-failure, depending on the version of Eigen code used. Similarly, invalid values for batch_dim can also trigger the same behavior. The impact of this vulnerability can result in the disruption 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.1.52.1.5 -
>= 2.2.0, < 2.2.32.2.3 -
>= 2.3.0, < 2.3.32.3.3 -
>= 2.4.0, < 2.4.22.4.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, users can avoid passing negative or invalid values for seq_dim and batch_dim when using the tf.raw_ops.ReverseSequence operation. Ensuring that only valid and positive values are provided as arguments can help prevent the exploitation of this vulnerability.
Conclusion
The vulnerability identified as CVE-2021-29575 in TensorFlow can lead to a denial of service (DoS) attack or stack overflow. It is crucial to update to the latest patched version of TensorFlow to mitigate the risk associated with this vulnerability. For further support and assistance in 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 resources for developing and deploying machine learning models.
This vulnerability can lead to a denial of service (DoS) attack or stack overflow, potentially disrupting TensorFlow-based applications and services.
The vulnerability affects TensorFlow versions 0 and 2.1.4 to 2.4.2. It is recommended to update to the latest patched version to mitigate the risk.
To fix this vulnerability, update TensorFlow to the latest patched version, which includes the necessary fixes.
As a temporary workaround, ensure that only valid and positive values are passed as arguments for seq_dim and batch_dim in the tf.raw_ops.ReverseSequence operation.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.