VYPR
Moderate severityNVD Advisory· Published May 20, 2022· Updated Apr 22, 2025

Missing validation causes denial of service in TensorFlow via `Conv3DBackpropFilterV2`

CVE-2022-29204

Description

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of tf.raw_ops.UnsortedSegmentJoin does not fully validate the input arguments. This results in a CHECK-failure which can be used to trigger a denial of service attack. The code assumes num_segments is a positive scalar but there is no validation. Since this value is used to allocate the output tensor, a negative value would result in a CHECK-failure (assertion failure), as per TFSA-2021-198. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.6.42.6.4
tensorflowPyPI
>= 2.7.0, < 2.7.22.7.2
tensorflowPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflow-cpuPyPI
< 2.6.42.6.4
tensorflow-cpuPyPI
>= 2.7.0, < 2.7.22.7.2
tensorflow-cpuPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflow-gpuPyPI
< 2.6.42.6.4
tensorflow-gpuPyPI
>= 2.7.0, < 2.7.22.7.2
tensorflow-gpuPyPI
>= 2.8.0, < 2.8.12.8.1

Affected products

1

Patches

2
20cb18724b0b

Allow 0 for number of segments in `unsorted_segment_join_op.cc`

https://github.com/tensorflow/tensorflowMihai MaruseacApr 20, 2022via ghsa
1 file changed · +4 2
  • tensorflow/core/kernels/unsorted_segment_join_op.cc+4 2 modified
    @@ -94,8 +94,10 @@ class UnsortedSegmentJoinOp : public OpKernel {
                     errors::InvalidArgument("Number of segments cannot be empty."));
         auto num_segments = num_segments_tensor.scalar<NUM_SEGMENTS_TYPE>()();
     
    -    OP_REQUIRES(context, num_segments > 0,
    -                errors::InvalidArgument("Number of segments must be positive"));
    +    OP_REQUIRES(
    +        context, num_segments >= 0,
    +        errors::InvalidArgument(
    +            "Number of segments must be non-negative but got ", num_segments));
         OP_REQUIRES(context, segment_dims != 0,
                     errors::InvalidArgument("Segment_id cannot have rank 0"));
     
    
84563f265f28

Validate `num_segments > 0` in `unsorted_segment_join`

https://github.com/tensorflow/tensorflowMihai MaruseacApr 15, 2022via ghsa
1 file changed · +2 0
  • tensorflow/core/kernels/unsorted_segment_join_op.cc+2 0 modified
    @@ -94,6 +94,8 @@ class UnsortedSegmentJoinOp : public OpKernel {
                     errors::InvalidArgument("Number of segments cannot be empty."));
         auto num_segments = num_segments_tensor.scalar<NUM_SEGMENTS_TYPE>()();
     
    +    OP_REQUIRES(context, num_segments > 0,
    +                errors::InvalidArgument("Number of segments must be positive"));
         OP_REQUIRES(context, segment_dims != 0,
                     errors::InvalidArgument("Segment_id cannot have rank 0"));
     
    

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

11

News mentions

0

No linked articles in our index yet.