Skip to content
OpenAdvisories
Low · 2.5 CVE-2021-29567 BIT-tensorflow-2021-29567EUVD-2021-0308GHSA-wp3c-xw9g-gpcgPYSEC-2021-204PYSEC-2021-495PYSEC-2021-693

Lack of validation in `SparseDenseCwiseMul`

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. Due to lack of validation in `tf.raw_ops.SparseDenseCwiseMul`, an attacker can trigger denial of service via `CHECK`-fails or accesses to outside the bounds of heap allocated data. Since the implementation(https://github.com/tensorflow/tensorflow/blob/38178a2f7a681a7835bb0912702a134bfe3b4d84/tensorflow/core/kernels/sparse_dense_binary_op_shared.cc#L68-L80) only validates the rank of the input arguments but no constraints between dimensions(https://www.tensorflow.org/api_docs/python/tf/raw_ops/SparseDenseCwiseMul), an attacker can abuse them to trigger internal `CHECK` assertions (and cause program termination, denial of service) or to write to memory outside of bounds of heap allocated tensor buffers. 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-wp3c-xw9g-gpcg
PyPI tensorflow >= 2.2.0, < 2.2.3 2.2.3 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow >= 2.3.0, < 2.3.3 2.3.3 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow >= 2.4.0, < 2.4.2 2.4.2 GHSA-wp3c-xw9g-gpcg
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-204
PyPI tensorflow-cpu < 2.1.4 2.1.4 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow-cpu >= 2.2.0, < 2.2.3 2.2.3 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow-cpu >= 2.3.0, < 2.3.3 2.3.3 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow-cpu >= 2.4.0, < 2.4.2 2.4.2 GHSA-wp3c-xw9g-gpcg
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-495
PyPI tensorflow-gpu < 2.1.4 2.1.4 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow-gpu >= 2.2.0, < 2.2.3 2.2.3 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow-gpu >= 2.3.0, < 2.3.3 2.3.3 GHSA-wp3c-xw9g-gpcg
PyPI tensorflow-gpu >= 2.4.0, < 2.4.2 2.4.2 GHSA-wp3c-xw9g-gpcg
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-693

References