PT-2021-21769 · Google · Tensorflow

Published

2021-08-12

·

Updated

2024-03-06

·

CVE-2021-37653

CVSS v4.0

6.8

Medium

VectorAV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions TensorFlow versions prior to 2.6.0 TensorFlow versions 2.5.1 and earlier TensorFlow versions 2.4.3 and earlier TensorFlow versions 2.3.4 and earlier
Description An attacker can trigger a crash via a floating point exception in tf.raw ops.ResourceGather. The implementation computes the value of batch size and then divides by it without checking that this value is not 0. This can be exploited by creating a tensor with a specific shape and dtype, and then using tf.raw ops.ResourceGather with a batch dims value of 1 and validate indices set to False.
Recommendations For versions prior to 2.6.0, update to TensorFlow 2.6.0 or later. For versions 2.5.1 and earlier, update to TensorFlow 2.5.1 or later. For versions 2.4.3 and earlier, update to TensorFlow 2.4.3 or later. For versions 2.3.4 and earlier, update to TensorFlow 2.3.4 or later. As a temporary workaround, consider avoiding the use of tf.raw ops.ResourceGather with a batch dims value of 1 and validate indices set to False until a patch is available.

Fix

Divide By Zero

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BIT-TENSORFLOW-2021-37653
CVE-2021-37653
GHSA-QJJ8-32P7-H289
OPENSUSE-SU-2022:10014-1
OPENSUSE-SU-2024:12116-1
PYSEC-2021-275
PYSEC-2021-566
PYSEC-2021-764

Affected Products

Tensorflow