QID 981460
QID 981460: Python (pip) Security Update for tensorflow-gpu (GHSA-rrfp-j2mp-hq9c)
Security update has been released for tensorflow-gpu,tensorflow,tensorflow-cpu to fix the vulnerability.
Note: The preceding description block is extracted directly from the security advisory. Using automation, we have attempted to clean and format it as much as possible without introducing additional issues.
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 argument and then uses it to access the corresponding element of an array:
```
int64 TensorShapeBase<Shape>::dim_size(int d) const {
DCHECK_GE(d, 0);
DCHECK_LT(d, dims());
DoStuffWith(dims_[d]);
}
```
Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array.
- GHSA-rrfp-j2mp-hq9c -
github.com/advisories/GHSA-rrfp-j2mp-hq9c
CVEs related to QID 981460
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-rrfp-j2mp-hq9c | tensorflow |
|
|
| GHSA-rrfp-j2mp-hq9c | tensorflow-cpu |
|
|
| GHSA-rrfp-j2mp-hq9c | tensorflow-gpu |
|