CVE-2021-37664: Heap OOB in boosted trees in TensorFlow
Impact An attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to BoostedTreesSparseCalculateBestFeatureSplit:
python import tensorflow as tf
tf.rawops.BoostedTreesSparseCalculateBestFeatureSplit( nodeidrange=[0,10], statssummaryindices=[[1, 2, 3, 0x1000000]], statssummaryvalues=[1.0], statssummaryshape=[1,1,1,1], l1=l2=[1.0], treecomplexity=[0.5], minnodeweight=[1.0], logitsdimension=3, splittype='inequality')
The implementation needs to validate that each value in statssummaryindices is in range. Patches We have patched the issue in GitHub commit e84c975313e8e8e38bb2ea118196369c45c51378. 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 read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to BoostedTreesSparseCalculateBestFeatureSplit. The implementation needs to validate that each value in statssummaryindices is in range. We have patched the issue in GitHub commit e84c975313e8e8e38bb2ea118196369c45c51378. 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
TensorFlowto a version that resolves this vulnerability.Fixed in 2.6.0Patch e84c975313e8e8e38bb2ea118196369c45c51378 - Upgrade
Upgrade
TensorFlowto a version that resolves this vulnerability.Fixed in 2.5.1Patch e84c975313e8e8e38bb2ea118196369c45c51378 - Upgrade
Upgrade
TensorFlowto a version that resolves this vulnerability.Fixed in 2.4.3Patch e84c975313e8e8e38bb2ea118196369c45c51378 - Upgrade
Upgrade
TensorFlowto a version that resolves this vulnerability.Fixed in 2.3.4Patch e84c975313e8e8e38bb2ea118196369c45c51378 - Configuration
Update TensorFlow so the implementation of BoostedTreesSparseCalculateBestFeatureSplit validates that each value in stats_summary_indices is in range (as described for the stats_ops.cc change in commit e84c975313e8e8e38bb2ea118196369c45c51378).
TensorFlow BoostedTreesSparseCalculateBestFeatureSplit (stats_ops.cc) stats_summary_indices range validation = validate each value in stats_summary_indices is in range
Event History
Frequently Asked Questions
What is the severity of CVE-2021-37664?
CVE-2021-37664 has been classified as a medium severity vulnerability due to potential memory corruption risks.
How do I fix CVE-2021-37664?
To mitigate CVE-2021-37664, upgrade TensorFlow to version 2.5.1 or later.
Which versions of TensorFlow are affected by CVE-2021-37664?
CVE-2021-37664 impacts TensorFlow versions from 2.3.0 to 2.6.0-rc2, specifically 2.3.0 to 2.3.4, 2.4.0 to 2.4.3, and the 2.5.0 release.
What could happen if CVE-2021-37664 is exploited?
If exploited, CVE-2021-37664 may allow attackers to read out-of-bounds memory, leading to potential information leaks.
Is there a known exploit for CVE-2021-37664?
As of now, there are no publicly known exploits specific to CVE-2021-37664, but the risk of exploitation remains.