QID 981526
QID 981526: Python (pip) Security Update for tensorflow-gpu (GHSA-5xwc-mrhx-5g3m)
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 cause undefined behavior via binding a reference to null pointer in all operations of type `tf.raw_ops.MatrixDiagV*`:
```python
import tensorflow as tf
tf.raw_ops.MatrixDiagV3(
diagonal=[1,0],
k=[],
num_rows=[1,2,3],
num_cols=[4,5],
padding_value=[],
align='RIGHT_RIGHT')
```
The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/linalg/matrix_diag_op.cc) has incomplete validation that the value of `k` is a valid tensor. We have check that this value is either a scalar or a vector, but there is no check for the number of elements. If this is an empty tensor, then code that accesses the first element of the tensor is wrong:
```cc
auto& diag_index = context->input(1);
...
lower_diag_index = diag_index.flat<int32>()(0);
```
The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
- GHSA-5xwc-mrhx-5g3m -
github.com/advisories/GHSA-5xwc-mrhx-5g3m
CVEs related to QID 981526
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-5xwc-mrhx-5g3m | tensorflow |
|
|
| GHSA-5xwc-mrhx-5g3m | tensorflow-cpu |
|
|
| GHSA-5xwc-mrhx-5g3m | tensorflow-gpu |
|