Out-of-bounds Read Affecting tensorflow/tensorflow 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
high
0
10

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

Threat Intelligence

EPSS
0.04% (15th 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-UNMANAGED-TENSORFLOWTENSORFLOW-2333406
  • published12 Jan 2022
  • disclosed14 May 2021
  • creditUnknown

Introduced: 14 May 2021

CVE-2021-29570  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

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

Overview

Affected versions of this package are vulnerable to Out-of-bounds Read. TensorFlow is an end-to-end open source platform for machine learning. The implementation of tf.raw_ops.MaxPoolGradWithArgmax can cause reads outside of bounds of heap allocated data if attacker supplies specially crafted inputs. The implementation(https://github.com/tensorflow/tensorflow/blob/ef0c008ee84bad91ec6725ddc42091e19a30cf0e/tensorflow/core/kernels/maxpooling_op.cc#L1016-L1017) uses the same value to index in two different arrays but there is no guarantee that the sizes are identical. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

CVSS Scores

version 3.1