CVE-2020-15265
published 2020-10-21CVE-2020-15265: In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a…
high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a dimension outside the rank of the input tensor in the C++ kernel implementation. However, dim_size only does a DCHECK to validate the argument and then uses it to access the corresponding element of an array. Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array. The issue is patched in eccb7ec454e6617738554a255d77f08e60ee0808 and TensorFlow 2.4.0 will be released containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.
Affected
5 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | < 2.4.0 | 2.4.0 | |
| intel | optimization_for_tensorflow | >= 0 < 2.4.0 | 2.4.0 |
| intel | optimization_for_tensorflow | >= 0 < eccb7ec454e6617738554a255d77f08e60ee0808 | eccb7ec454e6617738554a255d77f08e60ee0808 |
| tensorflow | tensorflow | < 2.4.0 | 2.4.0 |
GHSA
Segfault in `tf.quantization.quantize_and_dequantize`
ghsa·2020-11-13
CVE-2020-15265 [HIGH] CWE-125 Segfault in `tf.quantization.quantize_and_dequantize`
Segfault in `tf.quantization.quantize_and_dequantize`
### Impact
An attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`:
```python
tf.quantization.quantize_and_dequantize(
input=[2.5, 2.5], input_min=[0,0], input_max=[1,1], axis=10)
```
This results in accessing [a dimension outside the rank of the input tensor](https://github.com/tensorflow/tensorflow/blob/0225022b725993bfc19b87a02a2faaad9a53bc17/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74) in the C++ kernel implementation:
```
const int depth = (axis_ == -1) ? 1 : input.dim_size(axis_);
```
However, [`dim_size` only does a `DCHECK`](https://github.com/tensorflow/tensorflow/blob/0225022b725993bfc19b87a02a2faaad9a53bc17/tensorflow/core/framework/tensor_shape.cc#L292-L307) to validate the
OSV
Segfault in `tf.quantization.quantize_and_dequantize`
osv·2020-11-13
CVE-2020-15265 [HIGH] Segfault in `tf.quantization.quantize_and_dequantize`
Segfault in `tf.quantization.quantize_and_dequantize`
### Impact
An attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`:
```python
tf.quantization.quantize_and_dequantize(
input=[2.5, 2.5], input_min=[0,0], input_max=[1,1], axis=10)
```
This results in accessing [a dimension outside the rank of the input tensor](https://github.com/tensorflow/tensorflow/blob/0225022b725993bfc19b87a02a2faaad9a53bc17/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74) in the C++ kernel implementation:
```
const int depth = (axis_ == -1) ? 1 : input.dim_size(axis_);
```
However, [`dim_size` only does a `DCHECK`](https://github.com/tensorflow/tensorflow/blob/0225022b725993bfc19b87a02a2faaad9a53bc17/tensorflow/core/framework/tensor_shape.cc#L292-L307) to validate the
OSV
CVE-2020-15265: In Tensorflow before version 2
osv·2020-10-21
CVE-2020-15265 CVE-2020-15265: In Tensorflow before version 2
In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a dimension outside the rank of the input tensor in the C++ kernel implementation. However, dim_size only does a DCHECK to validate the argument and then uses it to access the corresponding element of an array. Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array. The issue is patched in eccb7ec454e6617738554a255d77f08e60ee0808 and TensorFlow 2.4.0 will be released containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.
Debian
CVE-2020-15265: tensorflow - In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value...
vendor_debian·2020·CVSS 5.9
CVE-2020-15265 [MEDIUM] CVE-2020-15265: tensorflow - In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value...
In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a dimension outside the rank of the input tensor in the C++ kernel implementation. However, dim_size only does a DCHECK to validate the argument and then uses it to access the corresponding element of an array. Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array. The issue is patched in eccb7ec454e6617738554a255d77f08e60ee0808 and TensorFlow 2.4.0 will be released containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.
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/eccb7ec454e6617738554a255d77f08e60ee0808https://github.com/tensorflow/tensorflow/issues/42105https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rrfp-j2mp-hq9chttps://github.com/tensorflow/tensorflow/commit/eccb7ec454e6617738554a255d77f08e60ee0808https://github.com/tensorflow/tensorflow/issues/42105https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rrfp-j2mp-hq9c
2020-10-21
Published