CVE-2021-41197
published 2021-11-05CVE-2021-41197: TensorFlow is an open source platform for machine learning. In affected versions TensorFlow allows tensor to have a large number of dimensions and each…
PriorityP420medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.31%
22.9th percentile
TensorFlow is an open source platform for machine learning. In affected versions TensorFlow allows tensor to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an `int64_t`. If an overflow occurs, `MultiplyWithoutOverflow` would return a negative result. In the majority of TensorFlow codebase this then results in a `CHECK`-failure. Newer constructs exist which return a `Status` instead of crashing the binary. This is similar to CVE-2021-29584. 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
17 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | < 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 | < d81b1351da3e8c884ff836b64458d94e4a157c15 | d81b1351da3e8c884ff836b64458d94e4a157c15 |
| intel | optimization_for_tensorflow | < 7c1692bd417eb4f9b33ead749a41166d6080af85 | 7c1692bd417eb4f9b33ead749a41166d6080af85 |
| intel | optimization_for_tensorflow | >= 0 < a871989d7b6c18cdebf2fb4f0e5c5b62fbc19edf | a871989d7b6c18cdebf2fb4f0e5c5b62fbc19edf |
| intel | optimization_for_tensorflow | >= 0 < 2.4.4 | 2.4.4 |
| intel | optimization_for_tensorflow | >= 0 < 2.5.3 | 2.5.3 |
| intel | optimization_for_tensorflow | >= 0 < 2.6.4 | 2.6.4 |
| 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.6.0 < 2.6.3 | 2.6.3 |
| intel | optimization_for_tensorflow | >= 2.7.0 < 2.7.1 | 2.7.1 |
| intel | optimization_for_tensorflow | >= 2.7.0 < 2.7.2 | 2.7.2 |
| intel | optimization_for_tensorflow | >= 2.7.0rc0 < 2.7.0 | 2.7.0 |
| intel | optimization_for_tensorflow | >= 2.8.0 < 2.8.1 | 2.8.1 |
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
ghsa5.5MEDIUM
osv5.5MEDIUM
vendor_debian2.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.
GHSA
`CHECK` failure in depthwise ops via overflows
ghsa·2022-05-25·CVSS 5.5
[MEDIUM] CWE-190 `CHECK` failure in depthwise ops via overflows
`CHECK` failure in depthwise ops via overflows
### Impact
The implementation of depthwise ops in TensorFlow is vulnerable to a denial of service via `CHECK`-failure (assertion failure) caused by overflowing the number of elements in a tensor:
```python
import tensorflow as tf
input = tf.constant(1, shape=[1, 4, 4, 3], dtype=tf.float32)
filter_sizes = tf.constant(1879048192, shape=[13], dtype=tf.int32)
out_backprop = tf.constant(1, shape=[1, 4, 4, 3], dtype=tf.float32)
tf.raw_ops.DepthwiseConv2dNativeBackpropFilter(
input=input, filter_sizes=filter_sizes, out_backprop=out_backprop, strides=[1, 1, 1, 1], padding="SAME")
```
This is another instance of [TFSA-2021-198](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md) (CVE-2021-41197).
###
OSV
`CHECK` failure in depthwise ops via overflows
osv·2022-05-25·CVSS 5.5
[MEDIUM] `CHECK` failure in depthwise ops via overflows
`CHECK` failure in depthwise ops via overflows
### Impact
The implementation of depthwise ops in TensorFlow is vulnerable to a denial of service via `CHECK`-failure (assertion failure) caused by overflowing the number of elements in a tensor:
```python
import tensorflow as tf
input = tf.constant(1, shape=[1, 4, 4, 3], dtype=tf.float32)
filter_sizes = tf.constant(1879048192, shape=[13], dtype=tf.int32)
out_backprop = tf.constant(1, shape=[1, 4, 4, 3], dtype=tf.float32)
tf.raw_ops.DepthwiseConv2dNativeBackpropFilter(
input=input, filter_sizes=filter_sizes, out_backprop=out_backprop, strides=[1, 1, 1, 1], padding="SAME")
```
This is another instance of [TFSA-2021-198](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md) (CVE-2021-41197).
###
GHSA
Integer overflows in Tensorflow
ghsa·2022-02-09·CVSS 5.5
CVE-2022-23567 [MEDIUM] CWE-190 Integer overflows in Tensorflow
Integer overflows in Tensorflow
### Impact
The [implementations of `Sparse*Cwise*` ops](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/sparse_dense_binary_op_shared.cc) are vulnerable to integer overflows. These can be used to trigger large allocations (so, OOM based denial of service) or `CHECK`-fails when building new `TensorShape` objects (so, assert failures based denial of service):
```python
import tensorflow as tf
import numpy as np
tf.raw_ops.SparseDenseCwiseDiv(
sp_indices=np.array([[9]]),
sp_values=np.array([5]),
sp_shape=np.array([92233720368., 92233720368]),
dense=np.array([4]))
```
We are missing some validation on the shapes of the input tensors as well as directly constructing a large `TensorShape` with user
GHSA
`CHECK`-fails when building invalid tensor shapes in Tensorflow
ghsa·2022-02-09·CVSS 5.5
CVE-2022-23569 [MEDIUM] CWE-617 `CHECK`-fails when building invalid tensor shapes in Tensorflow
`CHECK`-fails when building invalid tensor shapes in Tensorflow
### Impact
Multiple operations in TensorFlow can be used to trigger a denial of service via `CHECK`-fails (i.e., assertion failures). This is similar to [TFSA-2021-198](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md) (CVE-2021-41197) and has similar fixes.
### Patches
We have patched the reported issues in multiple GitHub commits. It is possible that other similar instances exist in TensorFlow, we will issue fixes as these are discovered.
The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
### For more information
Please consu
OSV
`CHECK`-fails when building invalid tensor shapes in Tensorflow
osv·2022-02-09·CVSS 5.5
CVE-2022-23569 [MEDIUM] `CHECK`-fails when building invalid tensor shapes in Tensorflow
`CHECK`-fails when building invalid tensor shapes in Tensorflow
### Impact
Multiple operations in TensorFlow can be used to trigger a denial of service via `CHECK`-fails (i.e., assertion failures). This is similar to [TFSA-2021-198](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md) (CVE-2021-41197) and has similar fixes.
### Patches
We have patched the reported issues in multiple GitHub commits. It is possible that other similar instances exist in TensorFlow, we will issue fixes as these are discovered.
The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
### For more information
Please consu
OSV
Integer overflows in Tensorflow
osv·2022-02-09·CVSS 5.5
CVE-2022-23568 [MEDIUM] Integer overflows in Tensorflow
Integer overflows in Tensorflow
### Impact
The [implementation of `AddManySparseToTensorsMap`](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/sparse_tensors_map_ops.cc) is vulnerable to an integer overflow which results in a `CHECK`-fail when building new `TensorShape` objects (so, an assert failure based denial of service):
```python
import tensorflow as tf
import numpy as np
tf.raw_ops.AddManySparseToTensorsMap(
sparse_indices=[(0,0),(0,1),(0,2),(4,3),(5,0),(5,1)],
sparse_values=[1,1,1,1,1,1],
sparse_shape=[2**32,2**32],
container='',
shared_name='',
name=None)
```
We are missing some validation on the shapes of the input tensors as well as directly constructing a large `TensorShape` with user-provided dimensions. The la
OSV
Integer Overflow or Wraparound in TensorFlow
osv·2022-02-09·CVSS 5.5
[MEDIUM] Integer Overflow or Wraparound in TensorFlow
Integer Overflow or Wraparound in TensorFlow
### Impact
The Grappler component of TensorFlow is vulnerable to a denial of service via `CHECK`-failure (assertion failure) in [constant folding](https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/constant_folding.cc#L963-L1035):
```cc
for (const auto& output_prop : output_props) {
const PartialTensorShape output_shape(output_prop.shape());
// ...
}
```
The `output_prop` tensor has a shape that is controlled by user input and this can result in triggering one of the `CHECK`s in the `PartialTensorShape` constructor. This is an instance of [TFSA-2021-198](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md) (CVE-2021-41197).
GHSA
Integer overflows in Tensorflow
ghsa·2022-02-09·CVSS 5.5
CVE-2022-23568 [MEDIUM] CWE-190 Integer overflows in Tensorflow
Integer overflows in Tensorflow
### Impact
The [implementation of `AddManySparseToTensorsMap`](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/sparse_tensors_map_ops.cc) is vulnerable to an integer overflow which results in a `CHECK`-fail when building new `TensorShape` objects (so, an assert failure based denial of service):
```python
import tensorflow as tf
import numpy as np
tf.raw_ops.AddManySparseToTensorsMap(
sparse_indices=[(0,0),(0,1),(0,2),(4,3),(5,0),(5,1)],
sparse_values=[1,1,1,1,1,1],
sparse_shape=[2**32,2**32],
container='',
shared_name='',
name=None)
```
We are missing some validation on the shapes of the input tensors as well as directly constructing a large `TensorShape` with user-provided dimensions. The la
GHSA
Integer Overflow or Wraparound in TensorFlow
ghsa·2022-02-09·CVSS 5.5
[MEDIUM] CWE-190 Integer Overflow or Wraparound in TensorFlow
Integer Overflow or Wraparound in TensorFlow
### Impact
The Grappler component of TensorFlow is vulnerable to a denial of service via `CHECK`-failure (assertion failure) in [constant folding](https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/constant_folding.cc#L963-L1035):
```cc
for (const auto& output_prop : output_props) {
const PartialTensorShape output_shape(output_prop.shape());
// ...
}
```
The `output_prop` tensor has a shape that is controlled by user input and this can result in triggering one of the `CHECK`s in the `PartialTensorShape` constructor. This is an instance of [TFSA-2021-198](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-198.md) (CVE-2021-41197).
OSV
Integer overflows in Tensorflow
osv·2022-02-09·CVSS 5.5
CVE-2022-23567 [MEDIUM] Integer overflows in Tensorflow
Integer overflows in Tensorflow
### Impact
The [implementations of `Sparse*Cwise*` ops](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/sparse_dense_binary_op_shared.cc) are vulnerable to integer overflows. These can be used to trigger large allocations (so, OOM based denial of service) or `CHECK`-fails when building new `TensorShape` objects (so, assert failures based denial of service):
```python
import tensorflow as tf
import numpy as np
tf.raw_ops.SparseDenseCwiseDiv(
sp_indices=np.array([[9]]),
sp_values=np.array([5]),
sp_shape=np.array([92233720368., 92233720368]),
dense=np.array([4]))
```
We are missing some validation on the shapes of the input tensors as well as directly constructing a large `TensorShape` with user
OSV
Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes
osv·2021-11-10·CVSS 5.5
CVE-2021-41197 [MEDIUM] Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes
Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes
### Impact
TensorFlow allows tensor to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an `int64_t`. If an overflow occurs, `MultiplyWithoutOverflow` would return a negative result. In the majority of TensorFlow codebase this then results in a `CHECK`-failure. Newer constructs exist which return a `Status` instead of crashing the binary.
For example [`AddDim`](https://github.com/tensorflow/tensorflow/blob/0b6b491d21d6a4eb5fbab1cca565bc1e94ca9543/tensorflow/core/framework/tensor_shape.cc#L395-L408) calls should be replaced by [`AddDimWithStatus`](https://github.com/tensorflow/tensorflow/blob/0b6b491d21d6a4eb5fbab1cca565
GHSA
Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes
ghsa·2021-11-10·CVSS 5.5
CVE-2021-41197 [MEDIUM] CWE-190 Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes
Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes
### Impact
TensorFlow allows tensor to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an `int64_t`. If an overflow occurs, `MultiplyWithoutOverflow` would return a negative result. In the majority of TensorFlow codebase this then results in a `CHECK`-failure. Newer constructs exist which return a `Status` instead of crashing the binary.
For example [`AddDim`](https://github.com/tensorflow/tensorflow/blob/0b6b491d21d6a4eb5fbab1cca565bc1e94ca9543/tensorflow/core/framework/tensor_shape.cc#L395-L408) calls should be replaced by [`AddDimWithStatus`](https://github.com/tensorflow/tensorflow/blob/0b6b491d21d6a4eb5fbab1cca565
OSV
CVE-2021-41197: TensorFlow is an open source platform for machine learning
osv·2021-11-05·CVSS 5.5
CVE-2021-41197 [MEDIUM] CVE-2021-41197: TensorFlow is an open source platform for machine learning
TensorFlow is an open source platform for machine learning. In affected versions TensorFlow allows tensor to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an `int64_t`. If an overflow occurs, `MultiplyWithoutOverflow` would return a negative result. In the majority of TensorFlow codebase this then results in a `CHECK`-failure. Newer constructs exist which return a `Status` instead of crashing the binary. This is similar to CVE-2021-29584. 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-41197: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 2.5
CVE-2021-41197 [LOW] CVE-2021-41197: 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 TensorFlow allows tensor to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an `int64_t`. If an overflow occurs, `MultiplyWithoutOverflow` would return a negative result. In the majority of TensorFlow codebase this then results in a `CHECK`-failure. Newer constructs exist which return a `Status` instead of crashing the binary. This is similar to CVE-2021-29584. 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/7c1692bd417eb4f9b33ead749a41166d6080af85https://github.com/tensorflow/tensorflow/commit/a871989d7b6c18cdebf2fb4f0e5c5b62fbc19edfhttps://github.com/tensorflow/tensorflow/commit/d81b1351da3e8c884ff836b64458d94e4a157c15https://github.com/tensorflow/tensorflow/issues/46890https://github.com/tensorflow/tensorflow/issues/51908https://github.com/tensorflow/tensorflow/security/advisories/GHSA-prcg-wp5q-rv7phttps://github.com/tensorflow/tensorflow/commit/7c1692bd417eb4f9b33ead749a41166d6080af85https://github.com/tensorflow/tensorflow/commit/a871989d7b6c18cdebf2fb4f0e5c5b62fbc19edfhttps://github.com/tensorflow/tensorflow/commit/d81b1351da3e8c884ff836b64458d94e4a157c15https://github.com/tensorflow/tensorflow/issues/46890https://github.com/tensorflow/tensorflow/issues/51908https://github.com/tensorflow/tensorflow/security/advisories/GHSA-prcg-wp5q-rv7p
2021-11-05
Published