PT-2020-18311 · Google · Tensorflow

Mihaimaruseac

·

Published

2020-01-28

·

Updated

2024-10-19

·

CVE-2020-5215

CVSS v3.1

7.5

High

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions TensorFlow versions prior to 1.15.1 TensorFlow versions prior to 2.0.1
Description Converting a string to a tf.float16 value results in a segmentation fault in eager mode, as format checks for this use case are only in graph mode. This issue can lead to denial of service in inference/training where a malicious attacker can send a data point containing a string instead of a tf.float16 value. Similar effects can be obtained by manipulating saved models and checkpoints, replacing a scalar tf.float16 value with a scalar string, triggering the issue due to automatic conversions. This can be easily reproduced by tf.constant("hello", tf.float16), if eager execution is enabled.
Recommendations For versions prior to 1.15.1, update to TensorFlow 1.15.1 or 2.1.0. For versions prior to 2.0.1, update to TensorFlow 2.0.1 or 2.1.0. As a temporary workaround, consider disabling eager execution until a patch is available. Restrict access to the tf.constant function with tf.float16 type to minimize the risk of exploitation. Avoid using the tf.float16 type in the affected API endpoints until the issue is resolved.

Exploit

Fix

Improper Check for Exceptional Conditions

RCE

Weakness Enumeration

Related Identifiers

BIT-TENSORFLOW-2020-5215
CVE-2020-5215
GHSA-977J-XJ7Q-2JR9
PYSEC-2020-258
PYSEC-2020-303
PYSEC-2020-338

Affected Products

Tensorflow