{"id":"CVE-2021-29574","published":"2021-05-14T19:16:13Z","modified":"2024-08-03T22:11:06Z","title":"Undefined behavior in `MaxPool3DGradGrad`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.raw_ops.MaxPool3DGradGrad` exhibits undefined behavior by dereferencing null pointers backing attacker-supplied empty tensors. The implementation(https://github.com/tensorflow/tensorflow/blob/72fe792967e7fd25234342068806707bbc116618/tensorflow/core/kernels/pooling_ops_3d.cc#L679-L703) fails to validate that the 3 tensor inputs are not empty. If any of them is empty, then accessing the elements in the tensor results in dereferencing a null pointer. 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.10184,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-828x-qc2p-wprq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/a3d9f9be9ac2296615644061b40cefcee341dcc4","tags":["x_refsource_MISC"]}],"priority":{"score":3.8,"factors":[{"name":"EPSS percentile","points":2.04},{"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-828x-qc2p-wprq","PYSEC-2021-211"],"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-828x-qc2p-wprq","PYSEC-2021-502"],"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-828x-qc2p-wprq","PYSEC-2021-700"],"provenance":"source"}],"summary":{"text":"The undefined behavior is in TensorFlow's tf.raw_ops.MaxPool3DGradGrad operation, in the 3D pooling kernel implementation, where the code does not check that its three tensor inputs are non-empty. An attacker who can supply empty tensors to this operation can trigger a null pointer dereference, which can crash the process, and exploitation requires local access with low privileges and high attack complexity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:49Z"},"euvd":{"id":"EUVD-2021-0315","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29574","children":[{"from":"CVE-2021-29574","to":"CVE-2021-29576","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/pooling_ops_3d.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/a3d9f9be9ac2296615644061b40cefcee341dcc4","https://github.com/tensorflow/tensorflow/commit/63c6a29d0f2d692b247f7bf81f8732d6442fad09"],"basis":"shared function","functions":["MaxPooling3dGradGradOp"]}]}]}}