PT-2021-18286 · Google · Tensorflow

Yakun Zhang

+1

·

Published

2021-05-14

·

Updated

2024-03-06

·

CVE-2021-29535

CVSS v3.1

7.8

High

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions: TensorFlow versions prior to 2.5.0 TensorFlow version 2.4.2 TensorFlow version 2.3.3 TensorFlow version 2.2.3 TensorFlow version 2.1.4
Description: An attacker can cause a heap buffer overflow in QuantizedMul by passing in invalid thresholds for the quantization. This is because the implementation assumes that the 4 arguments are always valid scalars and tries to access the numeric value directly. However, if any of these tensors is empty, then .flat<T>() is an empty buffer and accessing the element at position 0 results in overflow.
Recommendations: For TensorFlow versions prior to 2.5.0, update to version 2.5.0 or later. For TensorFlow version 2.4.2, update to a version that includes the cherrypicked commit. For TensorFlow version 2.3.3, update to a version that includes the cherrypicked commit. For TensorFlow version 2.2.3, update to a version that includes the cherrypicked commit. For TensorFlow version 2.1.4, update to a version that includes the cherrypicked commit. As a temporary workaround, consider validating the input tensors to ensure they are not empty before passing them to the QuantizedMul function.

Exploit

Fix

Memory Corruption

Weakness Enumeration

Related Identifiers

BIT-TENSORFLOW-2021-29535
CVE-2021-29535
GHSA-M3F9-W3P3-P669
PYSEC-2021-172
PYSEC-2021-463
PYSEC-2021-661

Affected Products

Tensorflow