CVE-2021-29610
published 2021-05-14CVE-2021-29610: TensorFlow is an end-to-end open source platform for machine learning. The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis`…
PriorityP337high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EPSS
0.20%
10.1th percentile
TensorFlow is an end-to-end open source platform for machine learning. The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis` argument:. The validation(https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74-L77) uses `||` to mix two different conditions. If `axis_ < -1` the condition in `OP_REQUIRES` will still be true, but this value of `axis_` results in heap underflow. This allows attackers to read/write to other data on the heap. 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
18 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| 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 | |
| intel | optimization_for_tensorflow | >= 0 < 2.1.4 | 2.1.4 |
| intel | optimization_for_tensorflow | >= 0 < c5b0d5f8ac19888e46ca14b0e27562e7fbbee9a9 | c5b0d5f8ac19888e46ca14b0e27562e7fbbee9a9 |
| intel | optimization_for_tensorflow | >= 0 < 2.2.0rc0 | 2.2.0rc0 |
| intel | optimization_for_tensorflow | >= 2.2.0 < 2.2.3 | 2.2.3 |
| intel | optimization_for_tensorflow | >= 2.2.0 < 2.3.0rc0 | 2.3.0rc0 |
| intel | optimization_for_tensorflow | >= 2.3.0 < 2.3.3 | 2.3.3 |
| intel | optimization_for_tensorflow | >= 2.3.0 < 2.3.4 | 2.3.4 |
| intel | optimization_for_tensorflow | >= 2.4.0 < 2.4.2 | 2.4.2 |
| intel | optimization_for_tensorflow | >= 2.4.0 < 2.4.3 | 2.4.3 |
| tensorflow | tensorflow | < 2.1.4 | 2.1.4 |
| tensorflow | tensorflow | — | — |
| tensorflow | tensorflow | — | — |
| tensorflow | tensorflow | — | — |
CVSS provenance
nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.04.6MEDIUMAV:L/AC:L/Au:N/C:P/I:P/A:P
vendor_debian3.6LOW
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-2021-29610: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. The valid...
vendor_debian·2021·CVSS 3.6
CVE-2021-29610 [LOW] CVE-2021-29610: tensorflow - TensorFlow is an end-to-end open source platform for machine learning. The valid...
TensorFlow is an end-to-end open source platform for machine learning. The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis` argument:. The validation(https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74-L77) uses `||` to mix two different conditions. If `axis_ < -1` the condition in `OP_REQUIRES` will still be true, but this value of `axis_` results in heap underflow. This allows attackers to read/write to other data on the heap. 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.
Scope: local
forky: re
OSV
Invalid validation in `QuantizeAndDequantizeV2`
osv·2021-05-21
CVE-2021-29610 [LOW] Invalid validation in `QuantizeAndDequantizeV2`
Invalid validation in `QuantizeAndDequantizeV2`
### Impact
The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis` argument:
```python
import tensorflow as tf
input_tensor = tf.constant([0.0], shape=[1], dtype=float)
input_min = tf.constant(-10.0)
input_max = tf.constant(-10.0)
tf.raw_ops.QuantizeAndDequantizeV2(
input=input_tensor, input_min=input_min, input_max=input_max,
signed_input=False, num_bits=1, range_given=False, round_mode='HALF_TO_EVEN',
narrow_range=False, axis=-2)
```
The [validation](https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74-L77) uses `||` to mix two different conditions:
```cc
OP_REQUIRES(ctx,
(axis_ == -1 || axis_ < input.shape().dim
GHSA
Invalid validation in `QuantizeAndDequantizeV2`
ghsa·2021-05-21
CVE-2021-29610 [LOW] CWE-665 Invalid validation in `QuantizeAndDequantizeV2`
Invalid validation in `QuantizeAndDequantizeV2`
### Impact
The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis` argument:
```python
import tensorflow as tf
input_tensor = tf.constant([0.0], shape=[1], dtype=float)
input_min = tf.constant(-10.0)
input_max = tf.constant(-10.0)
tf.raw_ops.QuantizeAndDequantizeV2(
input=input_tensor, input_min=input_min, input_max=input_max,
signed_input=False, num_bits=1, range_given=False, round_mode='HALF_TO_EVEN',
narrow_range=False, axis=-2)
```
The [validation](https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74-L77) uses `||` to mix two different conditions:
```cc
OP_REQUIRES(ctx,
(axis_ == -1 || axis_ < input.shape().dim
OSV
CVE-2021-29610: TensorFlow is an end-to-end open source platform for machine learning
osv·2021-05-14
CVE-2021-29610 CVE-2021-29610: TensorFlow is an end-to-end open source platform for machine learning
TensorFlow is an end-to-end open source platform for machine learning. The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis` argument:. The validation(https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74-L77) uses `||` to mix two different conditions. If `axis_ < -1` the condition in `OP_REQUIRES` will still be true, but this value of `axis_` results in heap underflow. This allows attackers to read/write to other data on the heap. 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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/commit/c5b0d5f8ac19888e46ca14b0e27562e7fbbee9a9https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mq5c-prh3-3f3hhttps://github.com/tensorflow/tensorflow/commit/c5b0d5f8ac19888e46ca14b0e27562e7fbbee9a9https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mq5c-prh3-3f3h
2021-05-14
Published