VYPR
Moderate severityNVD Advisory· Published Feb 4, 2022· Updated Apr 22, 2025

Multiple `CHECK`-fails in `function.cc` in Tensorflow

CVE-2022-23586

Description

Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a SavedModel such that assertions in function.cc would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.5.32.5.3
tensorflowPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflowPyPI
>= 2.7.0, < 2.7.12.7.1
tensorflow-cpuPyPI
< 2.5.32.5.3
tensorflow-cpuPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflow-cpuPyPI
>= 2.7.0, < 2.7.12.7.1
tensorflow-gpuPyPI
< 2.5.32.5.3
tensorflow-gpuPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflow-gpuPyPI
>= 2.7.0, < 2.7.12.7.1

Affected products

1

Patches

2
dcc21c7bc972

Eliminate debug `CHECK`-fail from `function.cc`

https://github.com/tensorflow/tensorflowMihai MaruseacNov 12, 2021via ghsa
1 file changed · +5 1
  • tensorflow/core/framework/function.cc+5 1 modified
    @@ -191,7 +191,11 @@ class FunctionInstantiationHelper {
         for (size_t i = 0; i < dtypes.size(); ++i) {
           TF_RETURN_IF_ERROR(AddItem(strings::StrCat(arg_def.name(), ":", i),
                                      {true, arg_index, 0, false, {dtypes[i]}}));
    -      DCHECK_EQ(arg_index, result_.nodes.size());
    +      if (arg_index != result_.nodes.size()) {
    +        return errors::Internal(
    +            "Expected arg_index to be equal to the number of nodes in result.",
    +            " Got ", arg_index, " and ", result_.nodes.size());
    +      }
           string name = arg_def.name();
           if (dtypes.size() > 1) {
             strings::StrAppend(&name, "_", i);
    
3d89911481ba

Eliminate `CHECK`-fail from `function.cc`.

https://github.com/tensorflow/tensorflowMihai MaruseacNov 12, 2021via ghsa
1 file changed · +3 1
  • tensorflow/core/framework/function.cc+3 1 modified
    @@ -181,7 +181,9 @@ class FunctionInstantiationHelper {
         DataTypeVector dtypes;
         TF_RETURN_IF_ERROR(
             ArgNumType(attr_values, arg_def, &is_type_list, &dtypes));
    -    CHECK_GE(dtypes.size(), size_t{1});
    +    if (dtypes.size() < size_t{1}) {
    +      return errors::Internal("Expected a list of at least one dtype");
    +    }
         int arg_index = result_.nodes.size();
         TF_RETURN_IF_ERROR(
             AddItem(arg_def.name(), {true, arg_index, 0, is_type_list, dtypes}));
    

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

8

News mentions

0

No linked articles in our index yet.