Buffer Overflow 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
medium
0
10

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

Threat Intelligence

EPSS
0.06% (28th 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-2333527
  • published12 Jan 2022
  • disclosed14 May 2021
  • creditUnknown

Introduced: 14 May 2021

CVE-2021-29575  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

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

Overview

Affected versions of this package are vulnerable to Buffer Overflow. TensorFlow is an end-to-end open source platform for machine learning. The implementation of tf.raw_ops.ReverseSequence allows for stack overflow and/or CHECK-fail based denial of service. The implementation(https://github.com/tensorflow/tensorflow/blob/5b3b071975e01f0d250c928b2a8f901cd53b90a7/tensorflow/core/kernels/reverse_sequence_op.cc#L114-L118) fails to validate that seq_dim and batch_dim arguments are valid. Negative values for seq_dim can result in stack overflow or CHECK-failure, depending on the version of Eigen code used to implement the operation. Similar behavior can be exhibited by invalid values of batch_dim. 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