Junglewise Threat Intelligence

CVE-2021-41198: PYSEC-2021-806 - TensorFlow is an open source platform for machine learning. In affected versions if `tf.tile` is called with a large input argument then the

CVE-2021-41198 · Severity: low · CVSS 3.1 · Published 2021-11-05

Technologies: tensorflow-cpu (PyPI), tensorflow-gpu (PyPI), Google TensorFlow. Vendors: PyPI, Google.

Executive brief

TensorFlow's tf.tile function contains an integer overflow vulnerability that causes the TensorFlow process to crash when handling large tensor tiling operations. An attacker with the ability to call tf.tile with crafted parameters can trigger an immediate denial of service, interrupting any machine learning workload or application relying on TensorFlow.

Technical details

The vulnerability is an integer overflow (CWE-190) in TensorFlow's tf.tile function. When tf.tile is called with large input dimensions, the computation of the output tensor size overflows the int64_t type. The overflow is detected via a CHECK statement that aborts the process rather than gracefully handling the condition. An attacker who can invoke tf.tile with crafted tensor dimensions (e.g., np.ones((1,1,1)) tiled by [100000000, 100000000, 100000000]) triggers an immediate denial of service. No special privileges or authentication are required if the attacker has local code execution or can submit jobs to a shared TensorFlow service. The fix was applied in commit 9294094df6fea79271778eb7e7ae1bad8b5ef98f and backported to versions 2.4.4, 2.5.2, 2.6.1, and included in 2.7.0.

Affected products

  • Google TensorFlow before 2.4.4, 2.5.0-2.5.1, 2.6.0
  • Google TensorFlow CPU before 2.4.4, 2.5.0-2.5.1, 2.6.0
  • Google TensorFlow GPU before 2.4.4, 2.5.0-2.5.1, 2.6.0

Timeline

  • 2021-11-10: disclosed: GHSA-2p25-55c9-h58q published
  • 2021-11: patched: Patches released in TensorFlow 2.4.4, 2.5.2, 2.6.1 and 2.7.0

References

Related threats