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

Null-dereference in Tensorflow

CVE-2022-23577

Description

Tensorflow is an Open Source Machine Learning Framework. The implementation of GetInitOp is vulnerable to a crash caused by dereferencing a null pointer. 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

1
4f38b1ac8e42

Prevent null dereference read in `GetInitOp`.

https://github.com/tensorflow/tensorflowMihai MaruseacNov 10, 2021via ghsa
1 file changed · +8 3
  • tensorflow/cc/saved_model/loader_util.cc+8 3 modified
    @@ -34,9 +34,14 @@ Status GetInitOp(const string& export_dir, const MetaGraphDef& meta_graph_def,
       const auto& init_op_sig_it =
           meta_graph_def.signature_def().find(kSavedModelInitOpSignatureKey);
       if (init_op_sig_it != sig_def_map.end()) {
    -    *init_op_name = init_op_sig_it->second.outputs()
    -                        .find(kSavedModelInitOpSignatureKey)
    -                        ->second.name();
    +    const auto& sig_def_outputs = init_op_sig_it->second.outputs();
    +    const auto& sig_def_outputs_it =
    +        sig_def_outputs.find(kSavedModelInitOpSignatureKey);
    +    if (sig_def_outputs_it == sig_def_outputs.end()) {
    +      return errors::FailedPrecondition("Could not find output ",
    +                                        kSavedModelInitOpSignatureKey);
    +    }
    +    *init_op_name = sig_def_outputs_it->second.name();
         return Status::OK();
       }
     
    

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.