CVE-2021-29579: TensorFlow - Heap Buffer Overflow in tf.raw_ops.MaxPoolGrad
Summary
CVE-2021-29579: Heap buffer overflow in MaxPoolGrad. Affects tensorflow across 4 version ranges.
< 2.1.4
>= 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-29579 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 includes various operations and functions to perform tasks such as data preprocessing, model training, and inference. However, a vulnerability has been discovered in the implementation of tf.raw_ops.MaxPoolGrad function, which can lead to a heap buffer overflow.
Vulnerability Detail
The vulnerability exists in the implementation of tf.raw_ops.MaxPoolGrad in TensorFlow. The function fails to validate the indices used to access elements of input/output arrays, resulting in potential out-of-bounds (OOB) access. While accesses to input_backprop_flat are guarded by FastBoundsCheck, the indexing in out_backprop_flat can lead to OOB access. This vulnerability can be exploited by an attacker to execute arbitrary code, cause a denial of service, or disclose sensitive information. The impact of this vulnerability is rated as high.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 2.1.42.1.4 -
>= 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
No workaround is currently available for this vulnerability. It is recommended to upgrade to the fixed version of TensorFlow as soon as possible.
Conclusion
In conclusion, a heap buffer overflow vulnerability has been discovered in TensorFlow's tf.raw_ops.MaxPoolGrad function. This vulnerability can be exploited to execute arbitrary code, cause a denial of service, or disclose sensitive information. It is crucial to upgrade to the fixed version of TensorFlow (2.5.0) or apply the backported fix for affected versions (2.1.4, 2.2.3, 2.3.3, and 2.4.2) as soon as possible. For further support on vulnerability remediation, please 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.
This vulnerability can be exploited by an attacker to execute arbitrary code, cause a denial of service, or disclose sensitive information. The impact is rated as high.
Versions 2.1.4, 2.2.3, 2.3.3, and 2.4.2 of TensorFlow are affected by this vulnerability.
No workaround is currently available for this vulnerability. It is recommended to upgrade to the fixed version of TensorFlow.
The fix for this vulnerability will be included in TensorFlow 2.5.0. It is recommended to upgrade to the latest version of TensorFlow as soon as it becomes available.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.