CVE-2021-37656: Reference binding to nullptr in `RaggedTensorToSparse` in TensorFlow
Impact An attacker can cause undefined behavior via binding a reference to null pointer in tf.rawops.RaggedTensorToSparse:
python import tensorflow as tf
tf.rawops.RaggedTensorToSparse( rtnestedsplits=[[0, 38, 0]], rtdensevalues=[]) The implementation has an incomplete validation of the splits values: it does not check that they are in increasing order.
Patches We have patched the issue in GitHub commit 1071f554dbd09f7e101324d366eec5f4fe5a3ece.
The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
For more information Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
Attribution This vulnerability has been reported by members of the Aivul Team from Qihoo 360.
Other sources
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in tf.rawops.RaggedTensorToSparse. The implementation has an incomplete validation of the splits values: it does not check that they are in increasing order. We have patched the issue in GitHub commit 1071f554dbd09f7e101324d366eec5f4fe5a3ece. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/tensorflow-gputo a version that resolves this vulnerability.Fixed in 2.5.1 - Upgrade
Upgrade
pip/tensorflow-gputo a version that resolves this vulnerability.Fixed in 2.4.3 - Upgrade
Upgrade
pip/tensorflow-gputo a version that resolves this vulnerability.Fixed in 2.3.4 - Upgrade
Upgrade
pip/tensorflow-cputo a version that resolves this vulnerability.Fixed in 2.5.1 - Upgrade
Upgrade
pip/tensorflow-cputo a version that resolves this vulnerability.Fixed in 2.4.3 - Upgrade
Upgrade
pip/tensorflow-cputo a version that resolves this vulnerability.Fixed in 2.3.4 - Upgrade
Upgrade
pip/tensorflowto a version that resolves this vulnerability.Fixed in 2.5.1 - Upgrade
Upgrade
pip/tensorflowto a version that resolves this vulnerability.Fixed in 2.4.3 - Upgrade
Upgrade
pip/tensorflowto a version that resolves this vulnerability.Fixed in 2.3.4 - Upgrade
Upgrade
TensorFlow tf.raw_ops.RaggedTensorToSparseto a version that resolves this vulnerability.Fixed in 2.6.0Patch 1071f554dbd09f7e101324d366eec5f4fe5a3ece - Upgrade
Upgrade
TensorFlow tf.raw_ops.RaggedTensorToSparseto a version that resolves this vulnerability.Fixed in 2.5.1Patch 1071f554dbd09f7e101324d366eec5f4fe5a3ece - Upgrade
Upgrade
TensorFlow tf.raw_ops.RaggedTensorToSparseto a version that resolves this vulnerability.Fixed in 2.4.3Patch 1071f554dbd09f7e101324d366eec5f4fe5a3ece - Upgrade
Upgrade
TensorFlow tf.raw_ops.RaggedTensorToSparseto a version that resolves this vulnerability.Fixed in 2.3.4Patch 1071f554dbd09f7e101324d366eec5f4fe5a3ece
Event History
Frequently Asked Questions
What is the severity of CVE-2021-37656?
CVE-2021-37656 has a severity rating of medium as it can lead to undefined behavior in TensorFlow.
How do I fix CVE-2021-37656?
To fix CVE-2021-37656, upgrade to TensorFlow versions 2.5.1 or 2.4.3, or any later version.
Which versions of TensorFlow are affected by CVE-2021-37656?
CVE-2021-37656 affects TensorFlow versions 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, and certain release candidates of 2.6.0.
What is the potential impact of CVE-2021-37656?
The potential impact of CVE-2021-37656 is that attackers can exploit the vulnerability to produce undefined behavior in applications using TensorFlow.
How can I identify if I'm using a vulnerable version regarding CVE-2021-37656?
You can identify vulnerable versions of TensorFlow by checking your installed version against the affected versions list provided for CVE-2021-37656.