Division by zero in TFLite's implementation of `DepthToSpace`
tensorflow
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI |
|
|
tensorflow
| Product | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI |
|
|
2.3.32.4.22.3.42.4.3| tensorflow-cpu PyPI |
|
|
| tensorflow-gpu PyPI |
|
|
TensorFlow is an end-to-end open source platform for machine learning. The implementation of the `DepthToSpace` TFLite operator is vulnerable to a division by zero error(https://github.com/tensorflow/tensorflow/blob/0d45ea1ca641b21b73bcf9c00e0179cda284e7e7/tensorflow/lite/kernels/depth_to_space.cc#L63-L69). An attacker can craft a model such that `params->block_size` is 0. 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.
From the CVE record · GitHub_M
The TFLite DepthToSpace operator can divide by zero when processing a crafted model with a block size of zero. An attacker who can get an application to process such a model can trigger the error; the input does not specify network access or authentication requirements.
Teams using PyPI tensorflow, tensorflow-cpu, or tensorflow-gpu in the affected 2.1 through 2.4 version ranges should check their installed versions.