PT-2021-21812 · Google · Tensorflow

Mihaimaruseac

·

Published

2021-08-12

·

Updated

2024-03-06

·

CVE-2021-37692

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 version 2.5.1
Description TensorFlow is an end-to-end open source platform for machine learning. In affected versions, under certain conditions, Go code can trigger a segfault in string deallocation. For string tensors, C.TF TString Dealloc is called during garbage collection within a finalizer function. However, tensor structure isn't checked until encoding to avoid a performance penalty. The current method for dealloc assumes that encoding succeeded, but segfaults when a string tensor is garbage collected whose encoding failed, such as due to mismatched dimensions.
Recommendations For TensorFlow versions prior to 2.6.0, update to version 2.6.0 to resolve the issue. For TensorFlow version 2.5.1, apply the patch from GitHub commit 8721ba96e5760c229217b594f6d2ba332beedf22 or wait for the cherrypicked commit to be included in a future release. As a temporary workaround, consider restricting the use of string tensors with mismatched dimensions to minimize the risk of exploitation.

Fix

RCE

Weakness Enumeration

Related Identifiers

BIT-TENSORFLOW-2021-37692
CVE-2021-37692
GHSA-CMGW-8VPC-RC59
OPENSUSE-SU-2022:10014-1
OPENSUSE-SU-2024:12116-1
PYSEC-2021-314
PYSEC-2021-605
PYSEC-2021-803

Affected Products

Tensorflow