Skip to content
OpenAdvisories
Low · 2.5 CVE-2021-29574 BIT-tensorflow-2021-29574EUVD-2021-0315GHSA-828x-qc2p-wprqPYSEC-2021-211PYSEC-2021-502PYSEC-2021-700

Undefined behavior in `MaxPool3DGradGrad`

Published May 14, 2021 · Updated Aug 3, 2024 · Assigned by GitHub_M

Description

TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.raw_ops.MaxPool3DGradGrad` exhibits undefined behavior by dereferencing null pointers backing attacker-supplied empty tensors. The implementation(https://github.com/tensorflow/tensorflow/blob/72fe792967e7fd25234342068806707bbc116618/tensorflow/core/kernels/pooling_ops_3d.cc#L679-L703) fails to validate that the 3 tensor inputs are not empty. If any of them is empty, then accessing the elements in the tensor results in dereferencing a null pointer. 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.

Affected products

VendorProductAffectedFixed
tensorflow tensorflow < 2.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3, >= 2.4.0, < 2.4.2 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI tensorflow < 2.1.4 2.1.4 GHSA-828x-qc2p-wprq
PyPI tensorflow >= 2.2.0, < 2.2.3 2.2.3 GHSA-828x-qc2p-wprq
PyPI tensorflow >= 2.3.0, < 2.3.3 2.3.3 GHSA-828x-qc2p-wprq
PyPI tensorflow >= 2.4.0, < 2.4.2 2.4.2 GHSA-828x-qc2p-wprq
PyPI tensorflow < 2.1.4 · >= 2.2.0, < 2.2.3 · >= 2.3.0, < 2.3.3 · >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2 PYSEC-2021-211
PyPI tensorflow-cpu < 2.1.4 2.1.4 GHSA-828x-qc2p-wprq
PyPI tensorflow-cpu >= 2.2.0, < 2.2.3 2.2.3 GHSA-828x-qc2p-wprq
PyPI tensorflow-cpu >= 2.3.0, < 2.3.3 2.3.3 GHSA-828x-qc2p-wprq
PyPI tensorflow-cpu >= 2.4.0, < 2.4.2 2.4.2 GHSA-828x-qc2p-wprq
PyPI tensorflow-cpu < 2.1.4 · >= 2.2.0, < 2.2.3 · >= 2.3.0, < 2.3.3 · >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2 PYSEC-2021-502
PyPI tensorflow-gpu < 2.1.4 2.1.4 GHSA-828x-qc2p-wprq
PyPI tensorflow-gpu >= 2.2.0, < 2.2.3 2.2.3 GHSA-828x-qc2p-wprq
PyPI tensorflow-gpu >= 2.3.0, < 2.3.3 2.3.3 GHSA-828x-qc2p-wprq
PyPI tensorflow-gpu >= 2.4.0, < 2.4.2 2.4.2 GHSA-828x-qc2p-wprq
PyPI tensorflow-gpu < 2.1.4 · >= 2.2.0, < 2.2.3 · >= 2.3.0, < 2.3.3 · >= 2.4.0, < 2.4.2 2.1.4, 2.2.3, 2.3.3, 2.4.2 PYSEC-2021-700

References