{"id":"CVE-2021-29579","published":"2021-05-14T19:15:50Z","modified":"2024-08-03T22:11:06Z","title":"Heap buffer overflow in `MaxPoolGrad`","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.MaxPoolGrad` is vulnerable to a heap buffer overflow. The implementation(https://github.com/tensorflow/tensorflow/blob/ab1e644b48c82cb71493f4362b4dd38f4577a1cf/tensorflow/core/kernels/maxpooling_op.cc#L194-L203) fails to validate that indices used to access elements of input/output arrays are valid. Whereas accesses to `input_backprop_flat` are guarded by `FastBoundsCheck`, the indexing in `out_backprop_flat` can result in OOB access. 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.00211,"percentile":0.06478,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-79fv-9865-4qcv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/a74768f8e4efbda4def9f16ee7e13cf3922ac5f7","tags":["x_refsource_MISC"]}],"priority":{"score":3.0,"factors":[{"name":"EPSS percentile","points":1.3},{"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-79fv-9865-4qcv","PYSEC-2021-216"],"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-79fv-9865-4qcv","PYSEC-2021-507"],"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-79fv-9865-4qcv","PYSEC-2021-705"],"provenance":"source"}],"summary":{"text":"A heap buffer overflow in the MaxPoolGrad operation of TensorFlow's machine learning platform, in the implementation of tf.raw_ops.MaxPoolGrad, where indices used to access the output gradient array are not validated, allowing out-of-bounds access. An attacker with local access and low privileges, where the attack is hard to carry out, could crash the process or disrupt availability, with no confidentiality or integrity impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:35Z"},"euvd":{"id":"EUVD-2021-0320","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29579","children":[{"from":"CVE-2021-29579","to":"CVE-2021-37674","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"The fixes for CVE-2021-29579 were incomplete.","from":"CVE.org","in":"CVE-2021-37674"},{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/maxpooling_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/a74768f8e4efbda4def9f16ee7e13cf3922ac5f7","https://github.com/tensorflow/tensorflow/commit/136b51f10903e044308cf77117c0ed9871350475"],"basis":"shared function","functions":["SpatialMaxPoolWithArgMaxHelper"]}]}]}}