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.
References
Link | Resource |
---|---|
https://github.com/tensorflow/tensorflow/commit/8721ba96e5760c229217b594f6d2ba332beedf22 | Patch Third Party Advisory |
https://github.com/tensorflow/tensorflow/pull/50508 | Patch Third Party Advisory |
https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cmgw-8vpc-rc59 | Third Party Advisory |
Configurations
History
31 Aug 2021, 15:00
Type | Values Removed | Values Added |
---|---|---|
CPE | 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 - Patch, Third Party Advisory |
18 Aug 2021, 21:56
Type | Values Removed | Values Added |
---|---|---|
CVSS |
v2 : v3 : |
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 - Third Party Advisory | |
References | (MISC) https://github.com/tensorflow/tensorflow/pull/50508 - Third Party Advisory | |
References | (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. |
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
- tensorflow
CWE
CWE-20
Improper Input Validation