Buffer Overflow Affecting tensorflow-cpu package, versions [, 2.1.4)[2.2.0, 2.2.3)[2.3.0, 2.3.3)[2.4.0, 2.4.2)


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-TENSORFLOWCPU-1296181
  • published21 May 2021
  • disclosed21 May 2021
  • creditUnknown

Introduced: 21 May 2021

CVE-2021-29512  (opens in a new tab)
CWE-119  (opens in a new tab)
CWE-120  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade tensorflow-cpu to version 2.1.4, 2.2.3, 2.3.3, 2.4.2 or higher.

Overview

tensorflow-cpu is a machine learning framework.

Affected versions of this package are vulnerable to Buffer Overflow. If the splits argument of RaggedBincount does not specify a valid SparseTensor, then an attacker can trigger a heap buffer overflow. This will cause a read from outside the bounds of the splits tensor buffer in the implementation of the RaggedBincount op. Before the for loop, batch_idx is set to 0. The user controls the splits array, making it contain only one element, 0. Thus, the code in the while loop would increment batch_idx and then try to read splits(1), which is outside of bounds.

References

CVSS Scores

version 3.1