Overflow/crash in `tf.range`
tensorflow
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI |
|
|
tensorflow
| Product | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI |
|
|
| tensorflow-cpu PyPI |
|
|
| tensorflow-gpu PyPI |
|
|
TensorFlow is an open source platform for machine learning. In affected versions while calculating the size of the output within the `tf.range` kernel, there is a conditional statement of type `int64 = condition ? int64 : double`. Due to C++ implicit conversion rules, both branches of the condition will be cast to `double` and the result would be truncated before the assignment. This result in overflows. 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.
From the CVE record · GitHub_M
Affected TensorFlow packages can overflow while calculating the output size in the tf.range kernel because an implicit conversion to double truncates the result. The input does not specify an attacker path or whether network access, authentication, or user interaction is required.
Teams using PyPI tensorflow, tensorflow-cpu, or tensorflow-gpu should check installations in the affected ranges: versions below 2.4.4, 2.5.0 through 2.5.1, 2.6.0, or 2.7.0 release candidates.