VYPR
Moderate severityNVD Advisory· Published Sep 16, 2022· Updated Apr 23, 2025

`CHECK` fail in `CollectiveGather` in TensorFlow

CVE-2022-35994

Description

TensorFlow is an open source platform for machine learning. When CollectiveGather receives an scalar input input, it gives a CHECK fails that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit c1f491817dec39a26be3c574e86a88c30f3c4770. 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 packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.7.22.7.2
tensorflowPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflowPyPI
>= 2.9.0, < 2.9.12.9.1
tensorflow-cpuPyPI
< 2.7.22.7.2
tensorflow-cpuPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflow-cpuPyPI
>= 2.9.0, < 2.9.12.9.1
tensorflow-gpuPyPI
< 2.7.22.7.2
tensorflow-gpuPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflow-gpuPyPI
>= 2.9.0, < 2.9.12.9.1

Affected products

1

Patches

1
c1f491817dec

Fix for check failure in CollectiveGather op.

https://github.com/tensorflow/tensorflowIsha ArkatkarJul 13, 2022via ghsa
2 files changed · +18 0
  • tensorflow/core/kernels/collective_ops.cc+4 0 modified
    @@ -176,6 +176,10 @@ class CollectiveGatherOpKernel : public CollectiveOpV1Kernel {
       void ComputeAsyncImpl(OpKernelContext* c, CollectiveExecutor* col_exec,
                             DoneCallback done) override {
         auto output_shape = c->input(0).shape();
    +    OP_REQUIRES_ASYNC(c, output_shape.dims() > 0,
    +                      errors::InvalidArgument("input should have rank > 0, ",
    +                                              "recieved ", output_shape.dims()),
    +                      done);
         output_shape.set_dim(
             0, output_shape.dim_size(0) * col_params_->group.group_size);
         col_params_->instance.shape = output_shape;
    
  • tensorflow/python/ops/collective_ops_test.py+14 0 modified
    @@ -451,6 +451,20 @@ def testCollectiveGroupSizeMismatch(self):
         ])
         context.ensure_initialized()
     
    +  @test_util.run_v2_only
    +  def testCollectiveGatherShapeCheckFailure(self):
    +    with self.assertRaisesRegex(errors.InvalidArgumentError,
    +                                'input should have rank > 0'):
    +      collective_ops.gen_collective_ops.CollectiveGather(
    +          input=1,
    +          group_size=1,
    +          group_key=1,
    +          instance_key=1,
    +          shape=(3, 3, 3),
    +          communication_hint='auto',
    +          timeout_seconds=0,
    +          name='')
    +
         @def_function.function
         def run_all_reduce():
           group_key = 10
    

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

News mentions

0

No linked articles in our index yet.