GHSA-h6gw-r52c-724r NULL Pointer Dereference and Access of Uninitialized Pointer in TensorFlow

Not scored Published

Attackers can trigger denial of service or read/write out-of-bounds memory via missing validation in TensorFlow's boosted trees implementation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is GHSA-h6gw-r52c-724r?

GHSA-h6gw-r52c-724r is a vulnerability in tensorflow, published on 9 Feb 2022.

Official description

Impact

The code for boosted trees in TensorFlow is still missing validation. This allows malicious users to read and write outside of bounds of heap allocated data as well as trigger denial of service (via dereferencing nullptrs or via CHECK-failures).

This follows after CVE-2021-41208 where these APIs were still vulnerable to multiple security issues.

Note: Given that the boosted trees implementation in TensorFlow is unmaintained, it is recommend to no longer use these APIs. Instead, please use the downstream TensorFlow Decision Forests project which is newer and supports more features.

These APIs are now deprecated in TensorFlow 2.8. We will remove TensorFlow's boosted trees APIs in subsequent releases.

Patches

We have patched the known issues in multiple GitHub commits.

The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

This should allow users to use existing boosted trees APIs for a while until they migrate to TensorFlow Decision Forests, while guaranteeing that known vulnerabilities are fixed.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

These vulnerabilities have been reported by Yu Tian of Qihoo 360 AIVul Team and Faysal Hossain Shezan from University of Virginia. Some of the issues have been discovered internally after a careful audit of the APIs.

Which versions are affected by GHSA-h6gw-r52c-724r?

18 open source packages ship an affected version, including tensorflow, tensorflow-cpu and tensorflow-gpu.

PackageAffectedFixed in
tensorflow PyPIAll versions2.5.3
tensorflow PyPIAll versions2.5.3
tensorflow PyPIFrom 2.6.02.6.3
tensorflow PyPIFrom 2.6.02.6.3
tensorflow PyPIFrom 2.7.02.7.1
tensorflow PyPIFrom 2.7.02.7.1
12 more packages
tensorflow-cpu PyPIAll versions2.5.3
tensorflow-cpu PyPIAll versions2.5.3
tensorflow-cpu PyPIFrom 2.6.02.6.3
tensorflow-cpu PyPIFrom 2.6.02.6.3
tensorflow-cpu PyPIFrom 2.7.02.7.1
tensorflow-cpu PyPIFrom 2.7.02.7.1
tensorflow-gpu PyPIAll versions2.5.3
tensorflow-gpu PyPIAll versions2.5.3
tensorflow-gpu PyPIFrom 2.6.02.6.3
tensorflow-gpu PyPIFrom 2.6.02.6.3
tensorflow-gpu PyPIFrom 2.7.02.7.1
tensorflow-gpu PyPIFrom 2.7.02.7.1

How do I fix GHSA-h6gw-r52c-724r?

Upgrade tensorflow to a fixed version for your release line: 2.5.3, 2.6.3 or 2.7.1.

Is GHSA-h6gw-r52c-724r being exploited?

There is no known exploitation of GHSA-h6gw-r52c-724r in the wild and no public exploit code.

Sources

Is GHSA-h6gw-r52c-724r in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free