CVE-2022-21736: TensorFlow - SparseTensorSliceDataset Null Pointer Dereference
Summary
CVE-2022-21736: Undefined behavior 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-21736 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 for building and deploying machine learning models. TensorFlow includes various components and APIs for data manipulation, model training, and inference. One of the key features of TensorFlow is its support for sparse tensors, which are efficient representations of tensors with a large number of zero values. However, the implementation of the SparseTensorSliceDataset in TensorFlow has a vulnerability that can lead to a null pointer dereference under certain conditions.
Vulnerability Detail
The vulnerability in TensorFlow's SparseTensorSliceDataset arises from the lack of validation of preconditions for the three input arguments that represent a sparse tensor. When these arguments do not satisfy the required conditions, the implementation can dereference a null pointer, leading to undefined behavior. An attacker could potentially exploit this vulnerability to cause a denial of service (DoS) or execute arbitrary code with the privileges of the TensorFlow process. The vulnerability has been assigned the CVE identifier CVE-2022-21736.
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
As this vulnerability is being addressed through software updates, there is no specific workaround provided. Users are encouraged to prioritize updating their TensorFlow installations to the patched versions.
Conclusion
The vulnerability in TensorFlow's SparseTensorSliceDataset can lead to a null pointer dereference, potentially resulting in a denial of service or arbitrary code execution. Users are advised to update their TensorFlow installations to the latest patched version as soon as it becomes available. 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 machine learning framework developed by Google. It provides a comprehensive ecosystem for building and deploying machine learning models.
A sparse tensor is an efficient representation of a tensor that contains a large number of zero values. It allows for more efficient storage and computation for tensors with sparse data.
The vulnerability in TensorFlow's SparseTensorSliceDataset can lead to a null pointer dereference, resulting in undefined behavior. This could potentially be exploited by an attacker to cause a denial of service or execute arbitrary code with the privileges of the TensorFlow process.
To fix this vulnerability, it is recommended to update your TensorFlow installation to the latest patched version as soon as it becomes available. The TensorFlow development team has addressed the issue in TensorFlow 2.8.0 and backported the fix to earlier versions within the supported range.
As this vulnerability is being addressed through software updates, there is no specific workaround provided. It is recommended to update your TensorFlow installation to the patched version.
References
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.