CVE-2021-37692 Segfault on strings tensors with mistmatched dimensions in TensorFlow
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- Debian
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.
Upgrade path
5 packages: 4 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| Google tensorflow | >= 2.5.0, < 2.6.0 | 2.6.0 | Fixed |
| pypi tensorflow(PyPI) | = 2.3.0; = 2.3.1; = 2.3.2; = 2.3.3 +7 more | 2.3.4, 2.4.3, 2.5.1 | Fixed |
| pypi tensorflow-cpu(PyPI) | = 2.3.0; = 2.3.1; = 2.3.2; = 2.3.3 +7 more | 2.3.4, 2.4.3, 2.5.1 | Fixed |
| pypi tensorflow-gpu(PyPI) | = 2.3.0; = 2.3.1; = 2.3.2; = 2.3.3 +7 more | 2.3.4, 2.4.3, 2.5.1 | Fixed |
| TensorFlow | = >= 2.5.0, < 2.5.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi tensorflow(PyPI) | >= 2.5.0rc0, < 2.5.1 | 2.5.1 |
| pypi tensorflow(PyPI) | = 2.5.0 | No fix listed |
| pypi tensorflow-cpu(PyPI) | >= 2.5.0rc0, < 2.5.1 | 2.5.1 |
| pypi tensorflow-cpu(PyPI) | = 2.5.0 | No fix listed |
| pypi tensorflow-gpu(PyPI) | >= 2.5.0rc0, < 2.5.1 | 2.5.1 |
| pypi tensorflow-gpu(PyPI) | = 2.5.0 | No fix listed |
| pypi tensorflow(PyPI) | >= 2.3.0, < 2.3.4 | 2.3.4 |
| pypi tensorflow(PyPI) | >= 2.4.0, < 2.4.3 | 2.4.3 |
| pypi tensorflow(PyPI) | = 2.3.0 | No fix listed |
| pypi tensorflow(PyPI) | = 2.3.1 | No fix listed |
| pypi tensorflow(PyPI) | = 2.3.2 | No fix listed |
| pypi tensorflow(PyPI) | = 2.3.3 | No fix listed |
| pypi tensorflow(PyPI) | = 2.4.0 | No fix listed |
| pypi tensorflow(PyPI) | = 2.4.1 | No fix listed |
| pypi tensorflow(PyPI) | = 2.4.2 | No fix listed |
| pypi tensorflow-cpu(PyPI) | >= 2.3.0, < 2.3.4 | 2.3.4 |
| pypi tensorflow-cpu(PyPI) | >= 2.4.0, < 2.4.3 | 2.4.3 |
| pypi tensorflow-cpu(PyPI) | = 2.3.0 | No fix listed |
| pypi tensorflow-cpu(PyPI) | = 2.3.1 | No fix listed |
| pypi tensorflow-cpu(PyPI) | = 2.3.2 | No fix listed |
| pypi tensorflow-cpu(PyPI) | = 2.3.3 | No fix listed |
| pypi tensorflow-cpu(PyPI) | = 2.4.0 | No fix listed |
| pypi tensorflow-cpu(PyPI) | = 2.4.1 | No fix listed |
| pypi tensorflow-cpu(PyPI) | = 2.4.2 | No fix listed |
| pypi tensorflow-gpu(PyPI) | >= 2.3.0, < 2.3.4 | 2.3.4 |
Show 10 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi tensorflow-gpu(PyPI) | >= 2.4.0, < 2.4.3 | 2.4.3 |
| pypi tensorflow-gpu(PyPI) | = 2.3.0 | No fix listed |
| pypi tensorflow-gpu(PyPI) | = 2.3.1 | No fix listed |
| pypi tensorflow-gpu(PyPI) | = 2.3.2 | No fix listed |
| pypi tensorflow-gpu(PyPI) | = 2.3.3 | No fix listed |
| pypi tensorflow-gpu(PyPI) | = 2.4.0 | No fix listed |
| pypi tensorflow-gpu(PyPI) | = 2.4.1 | No fix listed |
| pypi tensorflow-gpu(PyPI) | = 2.4.2 | No fix listed |
| Google tensorflow | >= 2.5.0, < 2.6.0 | 2.6.0 |
| TensorFlow | = >= 2.5.0, < 2.5.1 | No fix listed |
References
- github.com third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch third-party-advisory
- github.com patch third-party-advisory
- github.com
- github.com
- github.com
- github.com product
- github.com
- Debian Security Tracker CVE-2021-37692 vendor-advisory