Skip to content
OpenAdvisories
Medium · 5.9 CVE-2022-35960 BIT-tensorflow-2022-35960EUVD-2022-6941GHSA-v5xg-3q2c-c2r4PYSEC-2026-1036PYSEC-2026-3243PYSEC-2026-3370

`CHECK` failure in `TensorListReserve` in TensorFlow

Published Sep 16, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

Description

TensorFlow is an open source platform for machine learning. In `core/kernels/list_kernels.cc's TensorListReserve`, `num_elements` is assumed to be a tensor of size 1. When a `num_elements` of more than 1 element is provided, then `tf.raw_ops.TensorListReserve` fails the `CHECK_EQ` in `CheckIsAlignedAndSingleElement`. We have patched the issue in GitHub commit b5f6fbfba76576202b72119897561e3bd4f179c7. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.

Affected products

VendorProductAffectedFixed
tensorflow tensorflow < 2.7.2, >= 2.8.0, < 2.8.1, >= 2.9.0, < 2.9.1 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI tensorflow < 2.7.2 2.7.2 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow >= 2.8.0, < 2.8.1 2.8.1 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow >= 2.9.0, < 2.9.1 2.9.1 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow < 2.7.2 · >= 2.8.0, < 2.8.1 · >= 2.9.0, < 2.9.1 2.7.2, 2.8.1, 2.9.1 PYSEC-2026-3243
PyPI tensorflow-cpu < 2.7.2 2.7.2 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow-cpu >= 2.8.0, < 2.8.1 2.8.1 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow-cpu >= 2.9.0, < 2.9.1 2.9.1 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow-cpu < 2.7.2 · >= 2.8.0, < 2.8.1 · >= 2.9.0, < 2.9.1 2.7.2, 2.8.1, 2.9.1 PYSEC-2026-3370
PyPI tensorflow-gpu < 2.7.2 2.7.2 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow-gpu >= 2.8.0, < 2.8.1 2.8.1 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow-gpu >= 2.9.0, < 2.9.1 2.9.1 GHSA-v5xg-3q2c-c2r4
PyPI tensorflow-gpu < 2.7.2 · >= 2.8.0, < 2.8.1 · >= 2.9.0, < 2.9.1 2.7.2, 2.8.1, 2.9.1 PYSEC-2026-1036

References