CVE-2020-15202 Integer truncation in Shard API usage

Critical 9.0 Published Updated

Integer truncation in TensorFlow's Shard API can lead to memory corruption, crashes, or potential code execution when processing large parallel workloads.

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-15202?

CVE-2020-15202 is a critical vulnerability in Google Tensorflow, published on 25 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, the `Shard` API in TensorFlow expects the last argument to be a function taking two `int64` (i.e., `long long`) arguments. However, there are several places in TensorFlow where a lambda taking `int` or `int32` arguments is being used. In these cases, if the amount of work to be parallelized is large enough, integer truncation occurs. Depending on how the two arguments of the lambda are used, this can result in segfaults, read/write outside of heap allocated arrays, stack overflows, or data corruption. The issue is patched in commits 27b417360cbd671ef55915e4bb6bb06af8b8a832 and ca8c013b5e97b1373b3bb1c97ea655e69f31a575, and is released in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.

Weakness: CWE-754, CWE-197

Which versions are affected by CVE-2020-15202?

34 open source packages ship an affected version, including tensorflow, tensorflow-cpu and tensorflow-gpu. It affects 2 products.

PackageAffectedFixed in
tensorflow BitnamiAll versions1.15.4, 2.0.3, 2.1.2, 2.2.1, 2.3.1
tensorflow PyPIAll versions1.15.4, 2.0.3, 2.1.2, 2.2.1, 2.3.1
tensorflow PyPIAll versions1.15.4
tensorflow PyPIAll versions1.15.4
tensorflow PyPIFrom 2.0.02.0.3
tensorflow PyPIFrom 2.0.02.0.3
28 more packages
tensorflow PyPIFrom 2.1.02.1.2
tensorflow PyPIFrom 2.1.02.1.2
tensorflow PyPIFrom 2.2.02.2.1
tensorflow PyPIFrom 2.2.02.2.1
tensorflow PyPIFrom 2.3.02.3.1
tensorflow PyPIFrom 2.3.02.3.1
tensorflow-cpu PyPIAll versions1.15.4, 2.0.3, 2.1.2, 2.2.1, 2.3.1
tensorflow-cpu PyPIAll versions1.15.4
tensorflow-cpu PyPIAll versions1.15.4
tensorflow-cpu PyPIFrom 2.0.02.0.3
tensorflow-cpu PyPIFrom 2.0.02.0.3
tensorflow-cpu PyPIFrom 2.1.02.1.2
tensorflow-cpu PyPIFrom 2.1.02.1.2
tensorflow-cpu PyPIFrom 2.2.02.2.1
tensorflow-cpu PyPIFrom 2.2.02.2.1
tensorflow-cpu PyPIFrom 2.3.02.3.1
tensorflow-cpu PyPIFrom 2.3.02.3.1
tensorflow-gpu PyPIAll versions1.15.4, 2.0.3, 2.1.2, 2.2.1, 2.3.1
tensorflow-gpu PyPIAll versions1.15.4
tensorflow-gpu PyPIAll versions1.15.4
tensorflow-gpu PyPIFrom 2.0.02.0.3
tensorflow-gpu PyPIFrom 2.0.02.0.3
tensorflow-gpu PyPIFrom 2.1.02.1.2
tensorflow-gpu PyPIFrom 2.1.02.1.2
tensorflow-gpu PyPIFrom 2.2.02.2.1
tensorflow-gpu PyPIFrom 2.2.02.2.1
tensorflow-gpu PyPIFrom 2.3.02.3.1
tensorflow-gpu PyPIFrom 2.3.02.3.1

Products include Google Tensorflow, Opensuse Leap.

How do I fix CVE-2020-15202?

Upgrade tensorflow to a fixed version for your release line: 1.15.4, 2.0.3, 2.1.2 or 2.2.1.

Is CVE-2020-15202 being exploited?

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

All Google Tensorflow vulnerabilities

Sources

Also known as BIT-tensorflow-2020-15202, GHSA-h6fg-mjxg-hqq4, PYSEC-2020-125, PYSEC-2020-282, PYSEC-2020-317.

Is CVE-2020-15202 in your software?

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

Check your SBOMs for free