CVE-2020-15265 Segfault in Tensorflow

Medium 5.9 Published Updated

An attacker can cause a segmentation fault and denial of service in TensorFlow by passing an invalid axis value to the quantization function.

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

What is CVE-2020-15265?

CVE-2020-15265 is a medium-severity memory corruption vulnerability in Google Tensorflow, published on 21 Oct 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In Tensorflow before version 2.4.0, an attacker can pass an invalid `axis` value to `tf.quantization.quantize_and_dequantize`. This results in accessing a dimension outside the rank of the input tensor in the C++ kernel implementation. However, dim_size only does a DCHECK to validate the argument and then uses it to access the corresponding element of an array. Since in normal builds, `DCHECK`-like macros are no-ops, this results in segfault and access out of bounds of the array. The issue is patched in eccb7ec454e6617738554a255d77f08e60ee0808 and TensorFlow 2.4.0 will be released containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved.

Weakness: CWE-125

Which versions are affected by CVE-2020-15265?

10 open source packages ship an affected version, including tensorflow, tensorflow-cpu and tensorflow-gpu. It affects 1 product.

PackageAffectedFixed in
tensorflow BitnamiAll versions2.4.0
tensorflow PyPIAll versions2.4.0
tensorflow PyPIAll versions2.4.0
tensorflow PyPIAll versions2.4.0
tensorflow-cpu PyPIAll versions2.4.0
tensorflow-cpu PyPIAll versions2.4.0
4 more packages
tensorflow-cpu PyPIAll versions2.4.0
tensorflow-gpu PyPIAll versions2.4.0
tensorflow-gpu PyPIAll versions2.4.0
tensorflow-gpu PyPIAll versions2.4.0

Products include Google Tensorflow.

How do I fix CVE-2020-15265?

Upgrade tensorflow to 2.4.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2020-15265 being exploited?

There is no known exploitation of CVE-2020-15265 in the wild and no public exploit code.

All Google Tensorflow vulnerabilities

Sources

Also known as BIT-tensorflow-2020-15265, GHSA-rrfp-j2mp-hq9c, PYSEC-2020-138, PYSEC-2020-295, PYSEC-2020-330.

Is CVE-2020-15265 in your software?

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

Check your SBOMs for free