CVE-2021-37692

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*

History

31 Aug 2021, 15:00

Type Values Removed Values Added
CPE cpe:2.3:a:google:tensorflow:2.5.0:*:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:2.6.0:rc2:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:2.6.0:rc1:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:2.6.0:rc0:*:*:*:*:*:*
References (MISC) https://github.com/tensorflow/tensorflow/pull/50508 - Third Party Advisory (MISC) https://github.com/tensorflow/tensorflow/pull/50508 - Patch, Third Party Advisory

18 Aug 2021, 21:56

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : 2.1
v3 : 5.5
CPE cpe:2.3:a:google:tensorflow:2.6.0:rc0:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:2.6.0:rc1:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:2.5.0:*:*:*:*:*:*:*
cpe:2.3:a:google:tensorflow:2.6.0:rc2:*:*:*:*:*:*
References (CONFIRM) https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cmgw-8vpc-rc59 - (CONFIRM) https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cmgw-8vpc-rc59 - Third Party Advisory
References (MISC) https://github.com/tensorflow/tensorflow/pull/50508 - (MISC) https://github.com/tensorflow/tensorflow/pull/50508 - Third Party Advisory
References (MISC) https://github.com/tensorflow/tensorflow/commit/8721ba96e5760c229217b594f6d2ba332beedf22 - (MISC) https://github.com/tensorflow/tensorflow/commit/8721ba96e5760c229217b594f6d2ba332beedf22 - Patch, Third Party Advisory

13 Aug 2021, 00:15

Type Values Removed Values Added
CWE CWE-20
Summary 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. 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.

12 Aug 2021, 23:15

Type Values Removed Values Added
New CVE

Information

Published : 2021-08-12 23:15

Updated : 2024-02-04 21:47


NVD link : CVE-2021-37692

Mitre link : CVE-2021-37692

CVE.ORG link : CVE-2021-37692


JSON object : View

Products Affected

google

  • tensorflow
CWE
CWE-20

Improper Input Validation