PyPI: tensorflow-rocm-enhanced

CVE-2021-29540

Safety vulnerability ID: SFTY-20210514-52013

Safety legacy ID: pyup.io-58141

Tensorflow-rocm-enhanced 2.1.4, 2.2.3, 2.3.3 and 2.4.2 include a fix for CVE-2021-29540: TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow to occur in 'Conv2DBackpropFilter'. This is because the implementation (https://github.com/tensorflow/tensorflow/blob/1b0296c3b8dd9bd948f924aa8cd62f87dbb7c3da/tensorflow/core/kernels/conv_grad_filter_ops.cc#L495-L497) computes the size of the filter tensor but does not validate that it matches the number of elements in 'filter_sizes'. Later, when reading/writing to this buffer, code uses the value computed here, instead of the number of elements in the tensor.

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

Heap buffer overflow in `Conv2DBackpropFilter`

Advisory

Tensorflow-rocm-enhanced 2.1.4, 2.2.3, 2.3.3 and 2.4.2 include a fix for CVE-2021-29540: TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow to occur in 'Conv2DBackpropFilter'. This is because the implementation (https://github.com/tensorflow/tensorflow/blob/1b0296c3b8dd9bd948f924aa8cd62f87dbb7c3da/tensorflow/core/kernels/conv_grad_filter_ops.cc#L495-L497) computes the size of the filter tensor but does not validate that it matches the number of elements in 'filter_sizes'. Later, when reading/writing to this buffer, code uses the value computed here, instead of the number of elements in the tensor.

Affected Package

Affecting tensorflow-rocm-enhanced package, versions<2.1.4>=2.4.0rc0,<2.4.2>=2.3.0rc0,<2.3.3>=2.2.0rc0,<2.2.3

Also affects

---

How to Fix

Upgradetensorflow-rocm-enhancedto2.3.32.4.22.3.32.3.3or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more