Out-of-bounds Read Affecting tensorflow/tensorflow package, versions [2.6.0,2.6.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.21% (11th 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 Learn

Learn about Out-of-bounds Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-TENSORFLOWTENSORFLOW-2333550
  • published12 Jan 2022
  • disclosed5 Nov 2021
  • creditUnknown

Introduced: 5 Nov 2021

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

How to fix?

Upgrade tensorflow/tensorflow to version 2.6.1 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Read. TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for QuantizeV2 can trigger a read outside of bounds of heap allocated array. This occurs whenever axis is a negative value less than -1. In this case, we are accessing data before the start of a heap buffer. The code allows axis to be an optional argument (s would contain an error::NOT_FOUND error code). Otherwise, it assumes that axis is a valid index into the dimensions of the input tensor. If axis is less than -1 then this results in a heap OOB read. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, as this version is the only one that is also affected.

Note: Refer to https://security.snyk.io/vuln/SNYK-PYTHON-TENSORFLOW-1912589

CVSS Base Scores

version 3.1