CVE-2021-41195
Description
TensorFlow is an open source platform for machine learning. In affected versions the implementation of `tf.math.segment_*` operations results in a `CHECK`-fail related abort (and denial of service) if a segment id in `segment_ids` is large. This is similar to CVE-2021-29584 (and similar other reported vulnerabilities in TensorFlow, localized to specific APIs): the implementation (both on CPU and GPU) computes the output shape using `AddDim`. However, if the number of elements in the tensor overflows an `int64_t` value, `AddDim` results in a `CHECK` failure which provokes a `std::abort`. Instead, code should use `AddDimWithStatus`. 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.
How to fix
- google tensorflow2.4.4, 2.5.2, 2.6.1 or later
- tensorflow2.6.1, 2.5.2, 2.4.4 or later
- tensorflow-cpu2.6.1, 2.5.2, 2.4.4 or later
- tensorflow-gpu2.6.1, 2.5.2, 2.4.4 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| google tensorflow | v < 2.4.4, 2.5.0 ≤ v < 2.5.2, 2.6.0 ≤ v < 2.6.1 | 2.4.4, 2.5.2, 2.6.1 |
| tensorflowPyPI | 2.6.0 ≤ v < 2.6.1, 2.5.0 ≤ v < 2.5.2, v < 2.4.4 | 2.6.1, 2.5.2, 2.4.4 |
| tensorflow-cpuPyPI | 2.6.0 ≤ v < 2.6.1, 2.5.0 ≤ v < 2.5.2, v < 2.4.4 | 2.6.1, 2.5.2, 2.4.4 |
| tensorflow-gpuPyPI | 2.6.0 ≤ v < 2.6.1, 2.5.0 ≤ v < 2.5.2, v < 2.4.4 | 2.6.1, 2.5.2, 2.4.4 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.