cve.bz

CVE-2021-37652 google tensorflow: Double Free

7.8 highEPSS 0.2%Fix available

High (7.8) in google tensorflow. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in tensorflow 2.3.4, 2.4.3, 2.5.1.

On this page
TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation for `tf.raw_ops.BoostedTreesCreateEnsemble` can result in a use after free error if an attacker supplies specially crafted arguments. The [implementation](https://github.com/tensorflow/tensorflow/blob/f24faa153ad31a4b51578f8181d3aaab77a1ddeb/tensorflow/core/kernels/boosted_trees/resource_ops.cc#L55) uses a reference counted resource and decrements the refcount if the initialization fails, as it should. However, when the code was written, the resource was represented as a naked pointer but later refactoring has changed it to be a smart pointer. Thus, when the pointer leaves the scope, a subsequent `free`-ing of the resource occurs, but this fails to take into account that the refcount has already reached 0, thus the resource has been already freed. During this double-free process, members of the resource object are accessed for cleanup but they are invalid as the entire resource has been freed. We have patched the issue in GitHub commit 5ecec9c6fbdbc6be03295685190a45e7eee726ab. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 7th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-415 Double Free
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-37652 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-37652?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-37652?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-37652 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
google:tensorflowfrom 2.3.0 before 2.3.4
google:tensorflowfrom 2.4.0 before 2.4.3
google:tensorflow2.5.0
google:tensorflow2.6.0:rc0
google:tensorflow2.6.0:rc1
google:tensorflow2.6.0:rc2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m7fm-4jfh-jrg6PyPItensorflow<2.3.42.3.4
GHSA-m7fm-4jfh-jrg6PyPItensorflow>=2.4.0 <2.4.32.4.3
GHSA-m7fm-4jfh-jrg6PyPItensorflow>=2.5.0 <2.5.12.5.1
GHSA-m7fm-4jfh-jrg6PyPItensorflow-cpu<2.3.42.3.4
GHSA-m7fm-4jfh-jrg6PyPItensorflow-cpu>=2.4.0 <2.4.32.4.3
GHSA-m7fm-4jfh-jrg6PyPItensorflow-cpu>=2.5.0 <2.5.12.5.1
GHSA-m7fm-4jfh-jrg6PyPItensorflow-gpu<2.3.42.3.4
GHSA-m7fm-4jfh-jrg6PyPItensorflow-gpu>=2.4.0 <2.4.32.4.3
GHSA-m7fm-4jfh-jrg6PyPItensorflow-gpu>=2.5.0 <2.5.12.5.1
PYSEC-2021-274PyPItensorflow>=2.3.0 <2.3.4
>=2.4.0 <2.4.3
2.3.4, 2.4.3
PYSEC-2021-565PyPItensorflow-cpu>=2.3.0 <2.3.4
>=2.4.0 <2.4.3
2.3.4, 2.4.3
PYSEC-2021-763PyPItensorflow-gpu>=2.3.0 <2.3.4
>=2.4.0 <2.4.3
2.3.4, 2.4.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSEPackage Hub 15 SP3bazel-skylib1.0.31.0.3-bp153.2.1openSUSE-SU-2022:10014-1
SUSEPackage Hub 15 SP3bazel3.73.7.2-bp153.4.1openSUSE-SU-2022:10014-1
SUSEPackage Hub 15 SP3tensorflow2, tensorflow2-lite, tensorflow2_2_6_0-gnu-hpc and 1 more2.6.0-bp153.2.3.1openSUSE-SU-2022:10014-1
openSUSELeap 15.3bazel-skylib1.0.31.0.3-bp153.2.1openSUSE-SU-2022:10014-1
openSUSELeap 15.3bazel3.73.7.2-bp153.4.1openSUSE-SU-2022:10014-1
openSUSELeap 15.3tensorflow2, tensorflow2-lite, tensorflow2_2_6_0-gnu-hpc and 1 more2.6.0-bp153.2.3.1openSUSE-SU-2022:10014-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE · openSUSE.

References

Check your stackJSON