CVE-2022-29211
published 2022-05-21CVE-2022-29211: TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.histogram_fixed_width`…
PriorityP422medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.31%
23.4th percentile
TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.histogram_fixed_width` is vulnerable to a crash when the values array contain `Not a Number` (`NaN`) elements. The implementation assumes that all floating point operations are defined and then converts a floating point result to an integer index. If `values` contains `NaN` then the result of the division is still `NaN` and the cast to `int32` would result in a crash. This only occurs on the CPU implementation. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
Affected
13 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | < 2.6.4 | 2.6.4 | |
| tensorflow | — | — | |
| tensorflow | — | — | |
| tensorflow | — | — | |
| tensorflow | >= 2.7.0 < 2.7.2 | 2.7.2 | |
| intel | optimization_for_tensorflow | >= 0 < 2.6.4 | 2.6.4 |
| intel | optimization_for_tensorflow | >= 2.7.0 < 2.7.2 | 2.7.2 |
| intel | optimization_for_tensorflow | >= 2.8.0 < 2.8.1 | 2.8.1 |
| tensorflow | tensorflow | < 2.6.4 | 2.6.4 |
| tensorflow | tensorflow | — | — |
| 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.
Debian
CVE-2022-29211: tensorflow - TensorFlow is an open source platform for machine learning. Prior to versions 2....
vendor_debian·2022·CVSS 5.5
CVE-2022-29211 [MEDIUM] CVE-2022-29211: tensorflow - TensorFlow is an open source platform for machine learning. Prior to versions 2....
TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.histogram_fixed_width` is vulnerable to a crash when the values array contain `Not a Number` (`NaN`) elements. The implementation assumes that all floating point operations are defined and then converts a floating point result to an integer index. If `values` contains `NaN` then the result of the division is still `NaN` and the cast to `int32` would result in a crash. This only occurs on the CPU implementation. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
Scope: local
forky: resolved
sid: resolved
GHSA
Segfault if `tf.histogram_fixed_width` is called with NaN values in TensorFlow
ghsa·2022-05-24
CVE-2022-29211 [MEDIUM] CWE-20 Segfault if `tf.histogram_fixed_width` is called with NaN values in TensorFlow
Segfault if `tf.histogram_fixed_width` is called with NaN values in TensorFlow
### Impact
The implementation of [`tf.histogram_fixed_width`](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc) is vulnerable to a crash when the values array contain `NaN` elements:
```python
import tensorflow as tf
import numpy as np
tf.histogram_fixed_width(values=np.nan, value_range=[1,2])
```
The [implementation](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc#L35-L74) assumes that all floating point operations are defined and then converts a floating point result to an integer index:
```cc
index_to_bin.device(d) =
((values.cwiseMax(value_range(0))
OSV
Segfault if `tf.histogram_fixed_width` is called with NaN values in TensorFlow
osv·2022-05-24
CVE-2022-29211 [MEDIUM] Segfault if `tf.histogram_fixed_width` is called with NaN values in TensorFlow
Segfault if `tf.histogram_fixed_width` is called with NaN values in TensorFlow
### Impact
The implementation of [`tf.histogram_fixed_width`](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc) is vulnerable to a crash when the values array contain `NaN` elements:
```python
import tensorflow as tf
import numpy as np
tf.histogram_fixed_width(values=np.nan, value_range=[1,2])
```
The [implementation](https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc#L35-L74) assumes that all floating point operations are defined and then converts a floating point result to an integer index:
```cc
index_to_bin.device(d) =
((values.cwiseMax(value_range(0))
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cchttps://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc#L35-L74https://github.com/tensorflow/tensorflow/commit/e57fd691c7b0fd00ea3bfe43444f30c1969748b5https://github.com/tensorflow/tensorflow/issues/45770https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrp2-fhq4-4q3whttps://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cchttps://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce81f886e/tensorflow/core/kernels/histogram_op.cc#L35-L74https://github.com/tensorflow/tensorflow/commit/e57fd691c7b0fd00ea3bfe43444f30c1969748b5https://github.com/tensorflow/tensorflow/issues/45770https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrp2-fhq4-4q3w
2022-05-21
Published