QID 980184
QID 980184: Python (pip) Security Update for tensorflow-gpu (GHSA-4f99-p9c2-3j8x)
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.
The [code for sparse matrix multiplication](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/kernels/sparse_matmul_op.cc#L954-L1086) is vulnerable to undefined behavior via binding a reference to `nullptr`:
```python
import tensorflow as tf
tf.raw_ops.SparseMatMul(
a=[[1.0,1.0,1.0]],
b=[[],[],[]],
transpose_a=False,
transpose_b=False,
a_is_sparse=False,
b_is_sparse=True)
```
This occurs whenever the dimensions of `a` or `b` are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access.
The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
- GHSA-4f99-p9c2-3j8x -
github.com/advisories/GHSA-4f99-p9c2-3j8x
CVEs related to QID 980184
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-4f99-p9c2-3j8x | tensorflow |
|
|
| GHSA-4f99-p9c2-3j8x | tensorflow-cpu |
|
|
| GHSA-4f99-p9c2-3j8x | tensorflow-gpu |
|