{"id":"CVE-2021-29515","published":"2021-05-14T19:36:20Z","modified":"2024-08-03T22:11:05Z","title":"Reference binding to null pointer in `MatrixDiag*` ops","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. The implementation of `MatrixDiag*` operations(https://github.com/tensorflow/tensorflow/blob/4c4f420e68f1cfaf8f4b6e8e3eb857e9e4c3ff33/tensorflow/core/kernels/linalg/matrix_diag_op.cc#L195-L197) does not validate that the tensor arguments are non-empty. 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.5,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00201,"percentile":0.05696,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hc6c-75p4-hmq4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/a7116dd3913c4a4afd2a3a938573aa7c785fdfc6","tags":["x_refsource_MISC"]}],"priority":{"score":2.9,"factors":[{"name":"EPSS percentile","points":1.14},{"name":"CVSS severity","points":1.75}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.1.4",">= 2.2.0, < 2.2.3",">= 2.3.0, < 2.3.3",">= 2.4.0, < 2.4.2"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-hc6c-75p4-hmq4","PYSEC-2021-152"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-hc6c-75p4-hmq4","PYSEC-2021-443"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-hc6c-75p4-hmq4","PYSEC-2021-641"],"provenance":"source"}],"summary":{"text":"The flaw is a reference binding to a null pointer in the MatrixDiag* operations of TensorFlow, a machine learning platform, because these operations do not check that their tensor arguments are non-empty. An attacker with local access and low privileges can trigger the null pointer dereference by supplying crafted inputs, which requires attack complexity to be high and results in a denial-of-service impact on availability only.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:48Z"},"euvd":{"id":"EUVD-2021-0256","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29515","children":[{"from":"CVE-2021-29515","to":"CVE-2021-37643","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/linalg/matrix_diag_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/a7116dd3913c4a4afd2a3a938573aa7c785fdfc6","https://github.com/tensorflow/tensorflow/commit/482da92095c4d48f8784b1f00dda4f81c28d2988"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.36,"basis":"same product + CWE + description similarity"}]},{"from":"CVE-2021-29515","to":"CVE-2021-37657","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/linalg/matrix_diag_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/a7116dd3913c4a4afd2a3a938573aa7c785fdfc6","https://github.com/tensorflow/tensorflow/commit/f2a673bd34f0d64b8e40a551ac78989d16daad09"],"basis":"shared function","functions":["MatrixDiagOp"]}]}]}}