GHSA-43q8-3fv7-pr5x Improper Validation of Integrity Check Value in TensorFlow

Not scored Published

A malicious user can trigger a denial of service via segmentation fault or heap out-of-bounds read in tf.sparse.split due to improper input validation.

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

What is GHSA-43q8-3fv7-pr5x?

GHSA-43q8-3fv7-pr5x is a denial of service vulnerability in tensorflow, published on 9 Feb 2022.

Official description

Impact

The implementation of tf.sparse.split does not fully validate the input arguments. Hence, a malicious user can trigger a denial of service via a segfault or a heap OOB read:

import tensorflow as tf
data = tf.random.uniform([1, 32, 32], dtype=tf.float32)
axis = [1, 2]
x = tf.sparse.from_dense(data)
result = tf.sparse.split(x,3, axis=axis)

The code assumes axis is a scalar. This is another instance of TFSA-2021-190 (CVE-2021-41206).

Patches

We have patched the issue in GitHub commit 61bf91e768173b001d56923600b40d9a95a04ad5 (merging #53695).

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.

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

This vulnerability has been reported externally via a GitHub issue.

Which versions are affected by GHSA-43q8-3fv7-pr5x?

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-43q8-3fv7-pr5x?

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

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is GHSA-43q8-3fv7-pr5x being exploited?

There is no known exploitation of GHSA-43q8-3fv7-pr5x in the wild and no public exploit code.

Sources

Is GHSA-43q8-3fv7-pr5x in your software?

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

Check your SBOMs for free