`CHECK_EQ` fail in `tf.raw_ops.TensorListResize` in Tensorflow
Description
TensorFlow is an open source platform for machine learning. If tf.raw_ops.TensorListResize is given a nonscalar value for input size, it results CHECK fail which can be used to trigger a denial of service attack. We have patched the issue in GitHub commit 888e34b49009a4e734c27ab0c43b0b5102682c56. The fix will be included in TensorFlow 2.11. We will also cherrypick this commit on TensorFlow 2.10.1, 2.9.3, and TensorFlow 2.8.4, as these are also affected and still in supported range.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
tensorflowPyPI | < 2.8.4 | 2.8.4 |
tensorflowPyPI | >= 2.9.0, < 2.9.3 | 2.9.3 |
tensorflowPyPI | >= 2.10.0, < 2.10.1 | 2.10.1 |
tensorflow-cpuPyPI | < 2.8.4 | 2.8.4 |
tensorflow-gpuPyPI | < 2.8.4 | 2.8.4 |
tensorflow-cpuPyPI | >= 2.9.0, < 2.9.3 | 2.9.3 |
tensorflow-gpuPyPI | >= 2.9.0, < 2.9.3 | 2.9.3 |
tensorflow-cpuPyPI | >= 2.10.0, < 2.10.1 | 2.10.1 |
tensorflow-gpuPyPI | >= 2.10.0, < 2.10.1 | 2.10.1 |
Affected products
1- Range: >= 2.10.0, < 2.10.1
Patches
1888e34b49009Fix tf.raw_ops.TensorListResize vulnerability with non-scalar input.
2 files changed · +11 −0
tensorflow/core/kernels/list_kernels.cc+2 −0 modified@@ -375,6 +375,8 @@ class TensorListResize : public OpKernel { void Compute(OpKernelContext* c) override { const TensorList* input_list = nullptr; OP_REQUIRES_OK(c, GetInputList(c, 0, &input_list)); + OP_REQUIRES(c, TensorShapeUtils::IsScalar(c->input(1).shape()), + errors::InvalidArgument("size must be a scalar")); int32_t size = c->input(1).scalar<int32>()(); OP_REQUIRES( c, size >= 0,
tensorflow/python/kernel_tests/data_structures/list_ops_test.py+9 −0 modified@@ -1658,6 +1658,15 @@ def testResizeWithInvalidSizeFails(self): l = list_ops.tensor_list_resize(l, -1) self.evaluate(l) + @test_util.run_in_graph_and_eager_modes + def testResizeWithNonScalarFails(self): + l = list_ops.tensor_list_from_tensor([3, 4, 5], element_shape=[]) + size = np.zeros([0, 2, 3, 3]) + with self.assertRaisesRegex((ValueError, errors.InvalidArgumentError), + r"Shape must be rank 0 but is rank \d+|" + r"\w+ must be a scalar"): + self.evaluate(gen_list_ops.TensorListResize(input_handle=l, size=size)) + @test_util.run_deprecated_v1 @test_util.enable_control_flow_v2 def testSkipEagerResizeGrad(self):
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-67pf-62xr-q35mghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-41893ghsaADVISORY
- github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/list_kernels.ccghsaWEB
- github.com/tensorflow/tensorflow/commit/888e34b49009a4e734c27ab0c43b0b5102682c56ghsaWEB
- github.com/tensorflow/tensorflow/security/advisories/GHSA-67pf-62xr-q35mghsaWEB
News mentions
0No linked articles in our index yet.