Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
5.5
CVE-2022-29211: TensorFlow may crash when histogram called with NaN values
CVE-2022-29211 · published 4 years ago
Summary
TensorFlow versions prior to the latest patches can stop working (crash) if the tf.histogram_fixed_width function receives a data value that is not a number (NaN). The crash happens only on CPU processing and can disrupt any machine‑learning job that uses this function. Updating TensorFlow to the newest release eliminates the problem.
What to do
- Update google inc. tensorflow to version 2.6.4.
- Update google inc. tensorflow to version 2.7.2.
- Update google inc. tensorflow to version 2.8.1.
- Update google inc. tensorflow-cpu to version 2.6.4.
- Update google inc. tensorflow-cpu to version 2.7.2.
- Update google inc. tensorflow-cpu to version 2.8.1.
- Update google tensorflow-gpu to version 2.6.4.
- Update google tensorflow-gpu to version 2.7.2.
- Update google tensorflow-gpu to version 2.8.1.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| pip | google inc. | tensorflow |
< 2.6.4 >= 2.7.0, < 2.7.2 >= 2.8.0, < 2.8.1 Fix: upgrade to 2.6.4
|
| pip | google inc. | tensorflow-cpu |
< 2.6.4 >= 2.7.0, < 2.7.2 >= 2.8.0, < 2.8.1 Fix: upgrade to 2.6.4
|
| pip | tensorflow-gpu |
< 2.6.4 >= 2.7.0, < 2.7.2 >= 2.8.0, < 2.8.1 Fix: upgrade to 2.6.4
|
|
| – | tensorflow |
< 2.6.4 >= 2.7.0, < 2.7.2 2.7.0 2.8.0 2.9.0 cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
Original advisory text
Segfault in TensorFlow if `tf.histogram_fixed_width` is called with NaN values
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.
References
- https://github.com/advisories/GHSA-xrp2-fhq4-4q3w
- https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce8... URL
- https://github.com/tensorflow/tensorflow/releases/tag/v2.6.4 URL
- https://github.com/tensorflow/tensorflow/blob/f3b9bf4c3c0597563b289c0512e98d4ce8... URL
- https://github.com/tensorflow/tensorflow/releases/tag/v2.7.2 URL
- https://github.com/tensorflow/tensorflow/releases/tag/v2.8.1 URL
- https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0 URL
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29211... Vendor Advisory
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xrp2-fhq4-4q3w Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-29211 Vendor Advisory
- https://github.com/tensorflow/tensorflow/issues/45770 Third Party Advisory
- https://github.com/tensorflow/tensorflow/commit/e57fd691c7b0fd00ea3bfe43444f30c1... Patch
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Type
CWE-20Improper Input Validation
Timeline
Published20 May 2022
Updated25 Nov 2026
First seen6 Mar 2026
Track software like this
Free during beta