{"id":"CVE-2021-29520","published":"2021-05-14T19:35:54Z","modified":"2024-08-03T22:11:05Z","title":"Heap buffer overflow in `Conv3DBackprop*`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. Missing validation between arguments to `tf.raw_ops.Conv3DBackprop*` operations can result in heap buffer overflows. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/4814fafb0ca6b5ab58a09411523b2193fed23fed/tensorflow/core/kernels/conv_grad_shape_utils.cc#L94-L153) assumes that the `input`, `filter_sizes` and `out_backprop` tensors have the same shape, as they are accessed in parallel. 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.00224,"percentile":0.13338,"provenance":"source"},"cwes":[{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-wcv5-qrj6-9pfm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/8f37b52e1320d8d72a9529b2468277791a261197","tags":["x_refsource_MISC"]}],"priority":{"score":4.4,"factors":[{"name":"EPSS percentile","points":2.67},{"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-wcv5-qrj6-9pfm","PYSEC-2021-157"],"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-wcv5-qrj6-9pfm","PYSEC-2021-448"],"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-wcv5-qrj6-9pfm","PYSEC-2021-646"],"provenance":"source"}],"euvd":{"id":"EUVD-2021-0261","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29520","children":[{"from":"CVE-2021-29520","to":"CVE-2021-29522","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/conv_grad_ops_3d.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/8f37b52e1320d8d72a9529b2468277791a261197","https://github.com/tensorflow/tensorflow/commit/311403edbc9816df80274bd1ea8b3c0c0f22c3fa"],"basis":"shared function","functions":["Conv3DBackpropFilterOp","Conv3DBackpropInputOp","Conv3DCustomBackpropFilterOp","Conv3DCustomBackpropInputOp"]}]},{"from":"CVE-2021-29520","to":"CVE-2022-29196","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/conv_grad_ops_3d.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/8f37b52e1320d8d72a9529b2468277791a261197","https://github.com/tensorflow/tensorflow/commit/174c5096f303d5be7ed2ca2662b08371bff4ab88"],"basis":"shared function","functions":["Conv3DBackpropFilterOp","Conv3DCustomBackpropFilterOp"]}]},{"from":"CVE-2021-29520","to":"CVE-2023-25661","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/conv_grad_ops_3d.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/8f37b52e1320d8d72a9529b2468277791a261197","https://github.com/tensorflow/tensorflow/commit/948fe6369a5711d4b4568ea9bbf6015c6dfb77e2"],"basis":"shared function","functions":["Conv3DBackpropInputOp"]}]}]}}