CVE-2021-37692

Medium

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 (e.g., due to mismatched dimensions). To fix this, the call to set the finalizer function is deferred until `NewTensor` returns and, if encoding failed for a string tensor, deallocs are determined based on bytes written. We have patched the issue in GitHub commit 8721ba96e5760c229217b594f6d2ba332beedf22. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, which is the other affected version.

SeverityMedium
CVSS5.5
Exploit probability—
ProductGoogle Tensorflow
PublishedAug 12, 2021
First seenAug 12, 2021

How to fix

Update
  • google tensorflow2.6.0 or later
  • tensorflow2.5.1, 2.3.4, 2.4.3 or later
  • tensorflow-cpu2.5.1, 2.3.4, 2.4.3 or later
  • tensorflow-gpu2.5.1, 2.3.4, 2.4.3 or later

Affected products

ProductAffected versionsFixed in
google tensorflow2.5.0 ≤ v < 2.6.02.6.0
tensorflowPyPI2.5.0rc0 ≤ v < 2.5.1, 2.3.0 ≤ v < 2.3.4, 2.4.0 ≤ v < 2.4.32.5.1, 2.3.4, 2.4.3
tensorflow-cpuPyPI2.5.0rc0 ≤ v < 2.5.1, 2.3.0 ≤ v < 2.3.4, 2.4.0 ≤ v < 2.4.32.5.1, 2.3.4, 2.4.3
tensorflow-gpuPyPI2.5.0rc0 ≤ v < 2.5.1, 2.3.0 ≤ v < 2.3.4, 2.4.0 ≤ v < 2.4.32.5.1, 2.3.4, 2.4.3

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.