CVE-2021-29584
published 2021-05-14CVE-2021-29584: TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in caused by an integer…
PriorityP419medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.19%
8.7th percentile
TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in caused by an integer overflow in constructing a new tensor shape. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/0908c2f2397c099338b901b067f6495a5b96760b/tensorflow/core/kernels/sparse_split_op.cc#L66-L70) builds a dense shape without checking that the dimensions would not result in overflow. The `TensorShape` constructor(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framework/tensor_shape.cc#L183-L188) uses a `CHECK` operation which triggers when `InitDims`(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framework/tensor_shape.cc#L212-L296) returns a non-OK status. This is a legacy implementation of the constructor and operations should use `BuildTensorShapeBase` or `AddDimWithStatus` to prevent `CHECK`-failures in the presence of overflows. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.
Affected
24 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | < 2.4.4 | 2.4.4 | |
| tensorflow | < 2.1.4 | 2.1.4 | |
| tensorflow | >= 2.2.0 < 2.2.3 | 2.2.3 | |
| tensorflow | >= 2.3.0 < 2.3.3 | 2.3.3 | |
| tensorflow | >= 2.4.0 < 2.4.2 | 2.4.2 | |
| 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 < e9c81c1e1a9cd8dd31f4e83676cab61b60658429 | e9c81c1e1a9cd8dd31f4e83676cab61b60658429 |
| intel | optimization_for_tensorflow | >= 0 < 2.1.4 | 2.1.4 |
| intel | optimization_for_tensorflow | >= 0 < 4c0ee937c0f61c4fc5f5d32d9bb4c67428012a60 | 4c0ee937c0f61c4fc5f5d32d9bb4c67428012a60 |
| intel | optimization_for_tensorflow | >= 2.2.0 < 2.2.3 | 2.2.3 |
| intel | optimization_for_tensorflow | >= 2.3.0 < 2.3.3 | 2.3.3 |
| intel | optimization_for_tensorflow | >= 2.4.0 < 2.4.2 | 2.4.2 |
| 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
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
Crash in `tf.math.segment_*` operations
ghsa·2021-11-10·CVSS 5.5
CVE-2021-41195 [MEDIUM] CWE-190 Crash in `tf.math.segment_*` operations
Crash in `tf.math.segment_*` operations
### Impact
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.
```python
import tensorflow as tf
tf.math.segment_max(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_min(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_mean(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_sum(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_prod(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
```
This is similar to [CVE-2021-29584](https://github.com/tensorflow/tensorflow/blob/3a74f0307236fe206b046689c4d76f57c9b74eee/tensorflow/security/advisor
OSV
Crash in `tf.math.segment_*` operations
osv·2021-11-10·CVSS 5.5
CVE-2021-41195 [MEDIUM] Crash in `tf.math.segment_*` operations
Crash in `tf.math.segment_*` operations
### Impact
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.
```python
import tensorflow as tf
tf.math.segment_max(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_min(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_mean(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_sum(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
tf.math.segment_prod(data=np.ones((1,10,1)), segment_ids=[1676240524292489355])
```
This is similar to [CVE-2021-29584](https://github.com/tensorflow/tensorflow/blob/3a74f0307236fe206b046689c4d76f57c9b74eee/tensorflow/security/advisor
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.
OSV
CVE-2021-41195: TensorFlow is an open source platform for machine learning
osv·2021-11-05·CVSS 5.5
CVE-2021-41195 [MEDIUM] CVE-2021-41195: TensorFlow is an open source platform for machine learning
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
OSV
CHECK-fail due to integer overflow
osv·2021-05-21
CVE-2021-29584 [LOW] CHECK-fail due to integer overflow
CHECK-fail due to integer overflow
### Impact
An attacker can trigger a denial of service via a `CHECK`-fail in caused by an integer overflow in constructing a new tensor shape:
```python
import tensorflow as tf
input_layer = 2**60-1
sparse_data = tf.raw_ops.SparseSplit(
split_dim=1,
indices=[(0, 0), (0, 1), (0, 2),
(4, 3), (5, 0), (5, 1)],
values=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
shape=(input_layer, input_layer),
num_split=2,
name=None
)
```
This is because the [implementation](https://github.com/tensorflow/tensorflow/blob/0908c2f2397c099338b901b067f6495a5b96760b/tensorflow/core/kernels/sparse_split_op.cc#L66-L70) builds a dense shape without checking that the dimensions would not result in overflow:
```cc
sparse::SparseTensor sparse_tensor;
OP_REQUIRES_OK(context,
sparse::SparseTensor
GHSA
CHECK-fail due to integer overflow
ghsa·2021-05-21
CVE-2021-29584 [LOW] CWE-190 CHECK-fail due to integer overflow
CHECK-fail due to integer overflow
### Impact
An attacker can trigger a denial of service via a `CHECK`-fail in caused by an integer overflow in constructing a new tensor shape:
```python
import tensorflow as tf
input_layer = 2**60-1
sparse_data = tf.raw_ops.SparseSplit(
split_dim=1,
indices=[(0, 0), (0, 1), (0, 2),
(4, 3), (5, 0), (5, 1)],
values=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
shape=(input_layer, input_layer),
num_split=2,
name=None
)
```
This is because the [implementation](https://github.com/tensorflow/tensorflow/blob/0908c2f2397c099338b901b067f6495a5b96760b/tensorflow/core/kernels/sparse_split_op.cc#L66-L70) builds a dense shape without checking that the dimensions would not result in overflow:
```cc
sparse::SparseTensor sparse_tensor;
OP_REQUIRES_OK(context,
sparse::SparseTensor
OSV
CVE-2021-29584: TensorFlow is an end-to-end open source platform for machine learning
osv·2021-05-14
CVE-2021-29584 CVE-2021-29584: TensorFlow is an end-to-end open source platform for machine learning
TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in caused by an integer overflow in constructing a new tensor shape. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/0908c2f2397c099338b901b067f6495a5b96760b/tensorflow/core/kernels/sparse_split_op.cc#L66-L70) builds a dense shape without checking that the dimensions would not result in overflow. The `TensorShape` constructor(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framework/tensor_shape.cc#L183-L188) uses a `CHECK` operation which triggers when `InitDims`(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framew
Debian
CVE-2021-41195: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 2.5
CVE-2021-41195 [LOW] CVE-2021-41195: 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 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
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
Debian
CVE-2021-29584: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. An attack...
vendor_debian·2021·CVSS 2.5
CVE-2021-29584 [LOW] CVE-2021-29584: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. An attack...
TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in caused by an integer overflow in constructing a new tensor shape. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/0908c2f2397c099338b901b067f6495a5b96760b/tensorflow/core/kernels/sparse_split_op.cc#L66-L70) builds a dense shape without checking that the dimensions would not result in overflow. The `TensorShape` constructor(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framework/tensor_shape.cc#L183-L188) uses a `CHECK` operation which triggers when `InitDims`(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framew
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/commit/4c0ee937c0f61c4fc5f5d32d9bb4c67428012a60https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xvjm-fvxx-q3hvhttps://github.com/tensorflow/tensorflow/commit/4c0ee937c0f61c4fc5f5d32d9bb4c67428012a60https://github.com/tensorflow/tensorflow/security/advisories/GHSA-xvjm-fvxx-q3hv
2021-05-14
Published