Out of bounds write in tensorflow-lite
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a write out bounds / segmentation fault if the segment ids are not sorted. Code assumes that the segment ids are in increasing order, using the last element of the tensor holding them to determine the dimensionality of output tensor. This results in allocating insufficient memory for the output tensor and in a write outside the bounds of the output array. This usually results in a segmentation fault, but depending on runtime conditions it can provide for a write gadget to be used in future memory corruption-based exploits. The issue is patched in commit 204945b19e44b57906c9344c0d00120eeeae178a and is released in TensorFlow versions 2.2.1, or 2.3.1. A potential workaround would be to add a custom `Verifier` to the model loading code to ensure that the segment ids are sorted, although this only handles the case when the segment ids are stored statically in the model. A similar validation could be done if the segment ids are generated at runtime between inference steps. If the segment ids are generated as outputs of a tensor during inference steps, then there are no possible workaround and users are advised to upgrade to patched code.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| tensorflow | 2.2.0 to before 2.2.1; 2.3.0 to before 2.3.1 | 2.2.1, 2.3.1 | Patch available | CNA | |
| — | tensorflow (PyPI) | 2.2.0 to before 2.2.1 | 2.2.1 | Patch available | GHSA-p2cq-cprg-frvm |
| — | tensorflow (PyPI) | 2.3.0 to before 2.3.1 | 2.3.1 | Patch available | GHSA-p2cq-cprg-frvm |
| — | tensorflow-cpu (PyPI) | 2.2.0 to before 2.2.1 | 2.2.1 | Patch available | GHSA-p2cq-cprg-frvm |
| — | tensorflow-cpu (PyPI) | 2.3.0 to before 2.3.1 | 2.3.1 | Patch available | GHSA-p2cq-cprg-frvm |
| — | tensorflow-gpu (PyPI) | 2.2.0 to before 2.2.1 | 2.2.1 | Patch available | GHSA-p2cq-cprg-frvm |
| — | tensorflow-gpu (PyPI) | 2.3.0 to before 2.3.1 | 2.3.1 | Patch available | GHSA-p2cq-cprg-frvm |
- tensorflow VendorGoogle Affected 2.2.0 to before 2.2.1; 2.3.0 to before 2.3.1 Fixed in 2.2.1, 2.3.1 Patch available CNA
- tensorflow (PyPI) Vendor— Affected 2.2.0 to before 2.2.1 Fixed in 2.2.1 Patch available GHSA-p2cq-cprg-frvm
- tensorflow (PyPI) Vendor— Affected 2.3.0 to before 2.3.1 Fixed in 2.3.1 Patch available GHSA-p2cq-cprg-frvm
- tensorflow-cpu (PyPI) Vendor— Affected 2.2.0 to before 2.2.1 Fixed in 2.2.1 Patch available GHSA-p2cq-cprg-frvm
- tensorflow-cpu (PyPI) Vendor— Affected 2.3.0 to before 2.3.1 Fixed in 2.3.1 Patch available GHSA-p2cq-cprg-frvm
- tensorflow-gpu (PyPI) Vendor— Affected 2.2.0 to before 2.2.1 Fixed in 2.2.1 Patch available GHSA-p2cq-cprg-frvm
- tensorflow-gpu (PyPI) Vendor— Affected 2.3.0 to before 2.3.1 Fixed in 2.3.1 Patch available GHSA-p2cq-cprg-frvm
Remediation
- Fix · CNA tensorflow (tensorflow) Fixed in 2.2.1, 2.3.1
- Fix · GHSA-p2cq-cprg-frvm tensorflow (PyPI) Fixed in 2.2.1 Advisory →
- Fix · GHSA-p2cq-cprg-frvm tensorflow (PyPI) Fixed in 2.3.1 Advisory →
- Fix · GHSA-p2cq-cprg-frvm tensorflow-cpu (PyPI) Fixed in 2.2.1 Advisory →
- Fix · GHSA-p2cq-cprg-frvm tensorflow-cpu (PyPI) Fixed in 2.3.1 Advisory →
- Fix · GHSA-p2cq-cprg-frvm tensorflow-gpu (PyPI) Fixed in 2.2.1 Advisory →
- Fix · GHSA-p2cq-cprg-frvm tensorflow-gpu (PyPI) Fixed in 2.3.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2020-15214
- 2026-10-03 Alias added: GHSA-p2cq-cprg-frvm
References
Advisory 2
Other 8
- https://github.com/tensorflow/tensorflow/commit/00c7ed7ce81c2126ebc17dfe7073b5c0efd5ec0a
- https://github.com/tensorflow/tensorflow/commit/a4030d8ba3692c438997c27be2dd95f3d5f54827
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2020-294.yaml
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2020-329.yaml
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2020-137.yaml
- https://github.com/tensorflow/tensorflow
- https://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/lite/kernels/internal/reference/reference_ops.h#L2625-L2631
- https://github.com/tensorflow/tensorflow/blob/0e68f4d3295eb0281a517c3662f6698992b7b2cf/tensorflow/lite/kernels/segment_sum.cc#L39-L44
More Google Tensorflow vulnerabilities
- TI-2022-20241 FractionalMaxPool and FractionalAVGPool heap out-of-bounds acess in Tensorflow CVSS 3.1CRITICAL 9.8
- TI-2022-07640 Integer overflow in Tensorflow CVSS 3.1CRITICAL 9.8
- TI-2022-07627 Out of bounds read and write in Tensorflow CVSS 3.1HIGH 8.8
- TI-2022-07619 Out of bounds write in Tensorflow CVSS 3.1HIGH 8.8
- TI-2022-07613 Read and Write outside of bounds in TFLite CVSS 3.1HIGH 8.8
- TI-2022-07612 Integer overflow in TFLite CVSS 3.1HIGH 8.8
Sources
- CVE-2020-15214 · CVE Program
- CVE-2020-15214 · NVD
- FIRST EPSS
- GHSA-p2cq-cprg-frvm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences