CVE-2020-15207 Segfault and data corruption in tensorflow-lite

High 8.7 Published Updated

Attackers can trigger out-of-bounds memory access in TensorFlow Lite via negative indices, causing crashes or data corruption.

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

CVE-2020-15207 is a high-severity memory corruption 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-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, to mimic Python's indexing with negative values, TFLite uses `ResolveAxis` to convert negative values to positive indices. However, the only check that the converted index is now valid is only present in debug builds. If the `DCHECK` does not trigger, then code execution moves ahead with a negative index. This, in turn, results in accessing data out of bounds which results in segfaults and/or data corruption. The issue is patched in commit 2d88f470dea2671b430884260f3626b1fe99830a, and is released in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1.

Weakness: CWE-787, CWE-119

Which versions are affected by CVE-2020-15207?

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

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

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

Is CVE-2020-15207 being exploited?

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

All Google Tensorflow vulnerabilities

Sources

Also known as BIT-tensorflow-2020-15207, GHSA-q4qf-3fc6-8x34, PYSEC-2020-130, PYSEC-2020-287, PYSEC-2020-322.

Is CVE-2020-15207 in your software?

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

Check your SBOMs for free