VYPR
Low severityNVD Advisory· Published May 14, 2021· Updated Aug 3, 2024

CHECK-fail in `CTCGreedyDecoder`

CVE-2021-29543

Description

TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a CHECK-fail in tf.raw_ops.CTCGreedyDecoder. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1615440b17b364b875eb06f43d087381f1460a65/tensorflow/core/kernels/ctc_decoder_ops.cc#L37-L50) has a CHECK_LT inserted to validate some invariants. When this condition is false, the program aborts, instead of returning a valid error to the user. This abnormal termination can be weaponized in denial of service attacks. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.1.42.1.4
tensorflowPyPI
>= 2.2.0, < 2.2.32.2.3
tensorflowPyPI
>= 2.3.0, < 2.3.32.3.3
tensorflowPyPI
>= 2.4.0, < 2.4.22.4.2
tensorflow-cpuPyPI
< 2.1.42.1.4
tensorflow-cpuPyPI
>= 2.2.0, < 2.2.32.2.3
tensorflow-cpuPyPI
>= 2.3.0, < 2.3.32.3.3
tensorflow-cpuPyPI
>= 2.4.0, < 2.4.22.4.2
tensorflow-gpuPyPI
< 2.1.42.1.4
tensorflow-gpuPyPI
>= 2.2.0, < 2.2.32.2.3
tensorflow-gpuPyPI
>= 2.3.0, < 2.3.32.3.3
tensorflow-gpuPyPI
>= 2.4.0, < 2.4.22.4.2

Affected products

1

Patches

1
ea3b43e98c32

Fix `tf.raw_ops.CTCGreedyDecoder` CHECK failure.

https://github.com/tensorflow/tensorflowAmit PatankarApr 22, 2021via ghsa
1 file changed · +2 0
  • tensorflow/core/kernels/ctc_decoder_ops.cc+2 0 modified
    @@ -232,6 +232,8 @@ class CTCGreedyDecoderOp : public OpKernel {
             int prev_indices = -1;
             for (int t = 0; t < seq_len_t(b); ++t) {
               int max_class_indices;
    +          OP_REQUIRES(ctx, input_list_t[t].dimension(1) > 0,
    +                      errors::InvalidArgument("Invalid input dimensions."));
               log_prob_t(b, 0) +=
                   -RowMax<T>(input_list_t[t], b, &max_class_indices);
               if (max_class_indices != blank_index &&
    

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

7

News mentions

0

No linked articles in our index yet.