{ "schema_version": "1.4.0", "id": "GHSA-828c-5j5q-vrjq", "modified": "2022-09-19T19:04:11Z", "published": "2022-09-16T22:01:12Z", "aliases": [ "CVE-2022-36013" ], "summary": "TensorFlow vulnerable to null-dereference in `mlir::tfg::GraphDefImporter::ConvertNodeDef`", "details": "### Impact\nWhen [`mlir::tfg::GraphDefImporter::ConvertNodeDef`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ir/importexport/graphdef_import.cc) tries to convert NodeDefs without an op name, it crashes.\n```cpp\nStatus GraphDefImporter::ConvertNodeDef(OpBuilder &builder, ConversionState &s,\n const NodeDef &node) {\n VLOG(4) << \"Importing: \" << node.name();\n OperationState state(ConvertLocation(node), absl::StrCat(\"tfg.\", node.op()));\n\n // The GraphImporter does light shape inference, but here we will defer all of\n // that to the shape inference pass.\n const OpDef *op_def;\n const OpRegistrationData *op_reg_data = nullptr;\n if ((op_reg_data = registry_.LookUp(node.op()))) {\n op_def = &op_reg_data->op_def;\n } else {\n auto it = function_op_defs_.find(node.op());\n if (it == function_op_defs_.end())\n return InvalidArgument(\"Unable to find OpDef for \", node.op());\n op_def = it->second;\n }\n```\n`node.op().empty()` cannot be empty.\n\n\n### Patches\nWe have patched the issue in GitHub commit [a0f0b9a21c9270930457095092f558fbad4c03e5](https://github.com/tensorflow/tensorflow/commit/a0f0b9a21c9270930457095092f558fbad4c03e5).\n\nThe 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.\n\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.", "severity": [ { "type": "CVSS_V3", "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H" } ], "affected": [ { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "2.7.2" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "2.8.0" }, { "fixed": "2.8.1" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "2.9.0" }, { "fixed": "2.9.1" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "2.7.2" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "2.8.0" }, { "fixed": "2.8.1" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "2.9.0" }, { "fixed": "2.9.1" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "2.7.2" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "2.8.0" }, { "fixed": "2.8.1" } ] } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "2.9.0" }, { "fixed": "2.9.1" } ] } ] } ], "references": [ { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-828c-5j5q-vrjq" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-36013" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/commit/a0f0b9a21c9270930457095092f558fbad4c03e5" }, { "type": "PACKAGE", "url": "https://github.com/tensorflow/tensorflow" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ir/importexport/graphdef_import.cc" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/releases/tag/v2.10.0" } ], "database_specific": { "cwe_ids": [ "CWE-476" ], "severity": "MODERATE", "github_reviewed": true, "github_reviewed_at": "2022-09-16T22:01:12Z", "nvd_published_at": "2022-09-16T23:15:00Z" } }