PT-2021-18300 · Google · Tensorflow

Yakun Zhang

+1

·

Published

2021-05-14

·

Updated

2024-03-06

·

CVE-2021-29549

CVSS v3.1

5.5

Medium

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions TensorFlow versions prior to 2.5.0 TensorFlow versions 2.4.1 and earlier TensorFlow versions 2.3.2 and earlier TensorFlow versions 2.2.2 and earlier TensorFlow versions 2.1.3 and earlier
Description An attacker can cause a runtime division by zero error and denial of service in tf.raw ops.QuantizedBatchNormWithGlobalNormalization and tf.raw ops.QuantizedAdd. This is because the implementation computes a modulo operation without validating that the divisor is not zero. Since vector num elements is determined based on input shapes, a user can trigger scenarios where this quantity is 0.
Recommendations For TensorFlow versions prior to 2.5.0, update to TensorFlow 2.5.0 or later. For TensorFlow versions 2.4.1 and earlier, update to TensorFlow 2.4.2 or later. For TensorFlow versions 2.3.2 and earlier, update to TensorFlow 2.3.3 or later. For TensorFlow versions 2.2.2 and earlier, update to TensorFlow 2.2.3 or later. For TensorFlow versions 2.1.3 and earlier, update to TensorFlow 2.1.4 or later. As a temporary workaround, consider disabling the tf.raw ops.QuantizedBatchNormWithGlobalNormalization and tf.raw ops.QuantizedAdd functions until a patch is available. Restrict access to the vulnerable modules to minimize the risk of exploitation. Avoid using the vector num elements variable in the affected API endpoints until the issue is resolved.

Exploit

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-29549
CVE-2021-29549
GHSA-X83M-P7PV-CH8V
PYSEC-2021-186
PYSEC-2021-477
PYSEC-2021-675

Affected Products

Tensorflow