QID 981527
QID 981527: Python (pip) Security Update for tensorflow-gpu (GHSA-6p5r-g9mq-ggh2)
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.MatrixSetDiagV*`:
```python
import tensorflow as tf
tf.raw_ops.MatrixSetDiagV3(
input=[1,2,3],
diagonal=[1,1],
k=[],
align='RIGHT_LEFT')
```
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-6p5r-g9mq-ggh2 -
github.com/advisories/GHSA-6p5r-g9mq-ggh2
CVEs related to QID 981527
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-6p5r-g9mq-ggh2 | tensorflow |
|
|
| GHSA-6p5r-g9mq-ggh2 | tensorflow-cpu |
|
|
| GHSA-6p5r-g9mq-ggh2 | tensorflow-gpu |
|