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

Incomplete validation in signal ops leads to crashes in TensorFlow

CVE-2022-29213

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 tf.compat.v1.signal.rfft2d and tf.compat.v1.signal.rfft3d lack input validation and under certain condition can result in crashes (due to CHECK-failures). 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

1
0a8a781e597b

Merge pull request #55274 from yongtang:55263-tf.signal.rfft2d

https://github.com/tensorflow/tensorflowTensorFlower GardenerMar 23, 2022via ghsa
2 files changed · +13 0
  • tensorflow/core/kernels/fft_ops.cc+4 0 modified
    @@ -66,6 +66,10 @@ class FFTBase : public OpKernel {
     
           auto fft_length_as_vec = fft_length.vec<int32>();
           for (int i = 0; i < fft_rank; ++i) {
    +        OP_REQUIRES(ctx, fft_length_as_vec(i) >= 0,
    +                    errors::InvalidArgument(
    +                        "fft_length[", i,
    +                        "] must >= 0, but got: ", fft_length_as_vec(i)));
             fft_shape[i] = fft_length_as_vec(i);
             // Each input dimension must have length of at least fft_shape[i]. For
             // IRFFTs, the inner-most input dimension must have length of at least
    
  • tensorflow/python/kernel_tests/signal/fft_ops_test.py+9 0 modified
    @@ -609,6 +609,15 @@ def test_grad_random(self, rank, extra_dims, size, np_rtype):
             self._tf_ifft_for_rank(rank), re, im, result_is_complex=False,
             rtol=tol, atol=tol)
     
    +  def test_invalid_args(self):
    +    # Test case for GitHub issue 55263
    +    a = np.empty([6, 0])
    +    b = np.array([1, -1])
    +    with self.assertRaisesRegex(errors.InvalidArgumentError, "must >= 0"):
    +      with self.session():
    +        v = fft_ops.rfft2d(input_tensor=a, fft_length=b)
    +        self.evaluate(v)
    +
     
     @test_util.run_all_in_graph_and_eager_modes
     class FFTShiftTest(test.TestCase, parameterized.TestCase):
    

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

10

News mentions

0

No linked articles in our index yet.