CVE-2022-23574: Out of bounds read and write in Tensorflow
Impact There is a typo in TensorFlow's SpecializeType which results in heap OOB read/write:
cc for (int i = 0; i < opdef.outputargsize(); i++) { // ... for (int j = 0; j < t->argssize(); j++) { auto arg = t->mutableargs(i); // ... } }
Due to a typo, arg is initialized to the ith mutable argument in a loop where the loop index is j. Hence it is possible to assign to arg from outside the vector of arguments. Since this is a mutable proto value, it allows both read and write to outside of bounds data.
Patches We have patched the issue in GitHub commit 0657c83d08845cc434175934c642299de2c0f042.
The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, and TensorFlow 2.6.3, 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.
Other sources
Tensorflow is an Open Source Machine Learning Framework. There is a typo in TensorFlow's SpecializeType which results in heap OOB read/write. Due to a typo, arg is initialized to the ith mutable argument in a loop where the loop index is j. Hence it is possible to assign to arg from outside the vector of arguments. Since this is a mutable proto value, it allows both read and write to outside of bounds data. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, and TensorFlow 2.6.3, as these are also affected and still in supported range.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-23574?
CVE-2022-23574 has a medium severity rating due to its potential for heap out-of-bounds read/write vulnerabilities.
How do I fix CVE-2022-23574?
To address CVE-2022-23574, upgrade to TensorFlow versions 2.5.3, 2.6.3, or 2.7.1 or later.
Which versions of TensorFlow are affected by CVE-2022-23574?
TensorFlow versions prior to 2.5.3, 2.6.3 (from 2.6.0 to 2.6.2), and 2.7.0 are affected by CVE-2022-23574.
What type of vulnerability is CVE-2022-23574?
CVE-2022-23574 is a heap out-of-bounds read/write vulnerability caused by a typo in TensorFlow's code.
Is CVE-2022-23574 related to TensorFlow's SpecializeType functionality?
Yes, CVE-2022-23574 is directly related to a typo in TensorFlow's SpecializeType function.