VYPR
Moderate severityNVD Advisory· Published Sep 16, 2022· Updated Apr 23, 2025

Null-dereference in `mlir::tfg::GraphDefImporter::ConvertNodeDef` in TensorFlow

CVE-2022-36013

Description

TensorFlow is an open source platform for machine learning. When mlir::tfg::GraphDefImporter::ConvertNodeDef tries to convert NodeDefs without an op name, it crashes. We have patched the issue in GitHub commit a0f0b9a21c9270930457095092f558fbad4c03e5. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.7.22.7.2
tensorflowPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflowPyPI
>= 2.9.0, < 2.9.12.9.1
tensorflow-cpuPyPI
< 2.7.22.7.2
tensorflow-cpuPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflow-cpuPyPI
>= 2.9.0, < 2.9.12.9.1
tensorflow-gpuPyPI
< 2.7.22.7.2
tensorflow-gpuPyPI
>= 2.8.0, < 2.8.12.8.1
tensorflow-gpuPyPI
>= 2.9.0, < 2.9.12.9.1

Affected products

1

Patches

1
a0f0b9a21c92

[TF] NodeDefs without an op name are invalid, return error on import

https://github.com/tensorflow/tensorflowA. Unique TensorFlowerJun 8, 2022via ghsa
2 files changed · +23 0
  • tensorflow/core/ir/importexport/graphdef_import.cc+3 0 modified
    @@ -746,6 +746,9 @@ StatusOr<unsigned> GraphDefImporter::ArgNumType(const NamedAttrList &attrs,
     Status GraphDefImporter::ConvertNodeDef(OpBuilder &builder, ConversionState &s,
                                             const NodeDef &node) {
       VLOG(4) << "Importing: " << node.name();
    +  if (node.op().empty())
    +    return InvalidArgument("Node ", node.name(), " has an empty op name");
    +
       OperationState state(ConvertLocation(node), absl::StrCat("tfg.", node.op()));
     
       // The GraphImporter does light shape inference, but here we will defer all of
    
  • tensorflow/core/ir/importexport/tests/graphdef_to_mlir/invalid_op_name.pbtxt+20 0 added
    @@ -0,0 +1,20 @@
    +# RUN: not tfg-translate -graphdef-to-mlir %s 2>&1 | FileCheck %s
    +
    +# CHECK: Node  has an empty op name
    +
    +library {
    +  function {
    +    signature {
    +      name: "\\344\\264\\264"
    +      description: "value"
    +      is_distributed_communication: true
    +    }
    +    node_def {
    +      input: "|"
    +    }
    +    control_ret {
    +      key: ""
    +      value: ""
    +    }
    +  }
    +}
    \ No newline at end of file
    

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

6

News mentions

0

No linked articles in our index yet.