CVE-2021-41212: Heap OOB read in `tf.ragged.cross`
Impact The shape inference code for tf.ragged.cross can trigger a read outside of bounds of heap allocated array:
python import tensorflow as tf
@tf.function def test(): y = tf.rawops.RaggedCross(raggedvalues=[], raggedrowsplits=[], sparseindices=[[5]], sparsevalues=[], sparseshape=[5], denseinputs=[['a']], inputorder='RD', hashedoutput=False, numbuckets=5, hashkey=2, outvaluestype=tf.string, outrowsplitstype=tf.int64) return y
test()
Patches We have patched the issue in GitHub commit fa6b7782fbb14aa08d767bc799c531f5e1fb3bb8.
The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.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 open source platform for machine learning. In affected versions the shape inference code for tf.ragged.cross can trigger a read outside of bounds of heap allocated array. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2021-41212?
CVE-2021-41212 has a severity rating classified as High due to the potential for access outside of allocated memory bounds.
How do I fix CVE-2021-41212?
To fix CVE-2021-41212, update TensorFlow to version 2.4.4 or later, specifically to either 2.5.2 or 2.6.1.
What versions of TensorFlow are affected by CVE-2021-41212?
CVE-2021-41212 affects TensorFlow versions prior to 2.4.4, 2.5.0 up to 2.5.2, and 2.6.0.
What are the potential impacts of CVE-2021-41212?
CVE-2021-41212 can lead to memory corruption and potentially allow attackers to execute arbitrary code or crash applications.
Is CVE-2021-41212 related to a specific TensorFlow feature?
Yes, CVE-2021-41212 specifically impacts the shape inference code for the tf.ragged.cross feature in TensorFlow.