CVE-2021-41202
published 2021-11-05CVE-2021-41202: 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…
PriorityP421medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.20%
10.4th percentile
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.
Affected
14 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | — | — | |
| tensorflow | >= 2.4.0 < 2.4.4 | 2.4.4 | |
| tensorflow | >= 2.5.0 < 2.5.2 | 2.5.2 | |
| tensorflow | >= 2.6.0 < 2.6.1 | 2.6.1 | |
| intel | optimization_for_tensorflow | < 6d94002a09711d297dbba90390d5482b76113899 | 6d94002a09711d297dbba90390d5482b76113899 |
| intel | optimization_for_tensorflow | >= 0 < 2.4.4 | 2.4.4 |
| intel | optimization_for_tensorflow | >= 0 < 1b0e0ec27e7895b9985076eab32445026ae5ca94 | 1b0e0ec27e7895b9985076eab32445026ae5ca94 |
| intel | optimization_for_tensorflow | >= 2.5.0 < 2.5.2 | 2.5.2 |
| intel | optimization_for_tensorflow | >= 2.6.0 < 2.6.1 | 2.6.1 |
| intel | optimization_for_tensorflow | >= 2.7.0rc0 < 2.7.0 | 2.7.0 |
| tensorflow | tensorflow | < 2.4.4 | 2.4.4 |
| tensorflow | tensorflow | — | — |
| tensorflow | tensorflow | — | — |
CVSS provenance
nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvdv2.02.1LOWAV:L/AC:L/Au:N/C:N/I:N/A:P
vendor_debian5.5LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Overflow/crash in `tf.range`
osv·2021-11-10
CVE-2021-41202 [MEDIUM] Overflow/crash in `tf.range`
Overflow/crash in `tf.range`
### Impact
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:
```python
import tensorflow as tf
tf.sparse.eye(num_rows=9223372036854775807, num_columns=None)
```
Similarly, `tf.range` would result in crashes due to overflows if the start or end point are too large.
```python
import tensorflow as tf
tf.range(start=-1e+38, limit=1)
```
### Patches
We have patched the issue in GitHub commits [6d94002a09711d297dbba90390d5482b76113899](https://github.com/tensorflow/tensorflow/commit/6d940
GHSA
Overflow/crash in `tf.range`
ghsa·2021-11-10
CVE-2021-41202 [MEDIUM] CWE-681 Overflow/crash in `tf.range`
Overflow/crash in `tf.range`
### Impact
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:
```python
import tensorflow as tf
tf.sparse.eye(num_rows=9223372036854775807, num_columns=None)
```
Similarly, `tf.range` would result in crashes due to overflows if the start or end point are too large.
```python
import tensorflow as tf
tf.range(start=-1e+38, limit=1)
```
### Patches
We have patched the issue in GitHub commits [6d94002a09711d297dbba90390d5482b76113899](https://github.com/tensorflow/tensorflow/commit/6d940
OSV
CVE-2021-41202: TensorFlow is an open source platform for machine learning
osv·2021-11-05
CVE-2021-41202 CVE-2021-41202: TensorFlow is an open source platform for machine learning
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.
Debian
CVE-2021-41202: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 5.5
CVE-2021-41202 [MEDIUM] CVE-2021-41202: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
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.
Scope: local
forky: resolved
sid: resolved
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/commit/1b0e0ec27e7895b9985076eab32445026ae5ca94https://github.com/tensorflow/tensorflow/commit/6d94002a09711d297dbba90390d5482b76113899https://github.com/tensorflow/tensorflow/issues/46889https://github.com/tensorflow/tensorflow/issues/46912https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrqm-fpgr-6hhxhttps://github.com/tensorflow/tensorflow/commit/1b0e0ec27e7895b9985076eab32445026ae5ca94https://github.com/tensorflow/tensorflow/commit/6d94002a09711d297dbba90390d5482b76113899https://github.com/tensorflow/tensorflow/issues/46889https://github.com/tensorflow/tensorflow/issues/46912https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrqm-fpgr-6hhx
2021-11-05
Published