CVE-2021-37663
August 12, 2021
TensorFlow is an end-to-end open source platform for machine learning. In affected versions due to incomplete validation in `tf.raw_ops.QuantizeV2`, an attacker can trigger undefined behavior via binding a reference to a null pointer or can access data outside the bounds of heap allocated arrays. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/quantize_op.cc#L59) has some validation but does not check that `min_range` and `max_range` both have the same non-zero number of elements. If `axis` is provided (i.e., not `-1`), then validation should check that it is a value in range for the rank of `input` tensor and then the lengths of `min_range` and `max_range` inputs match the `axis` dimension of the `input` tensor. We have patched the issue in GitHub commit 6da6620efad397c85493b8f8667b821403516708. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
Affected Packages
tensorflow (PYTHON):
Affected version(s) >=0.11.0rc2 <2.3.4Fix Suggestion:
Update to version 2.3.4tensorflow-cpu (PYTHON):
Affected version(s) >=0.0.0 <2.3.4Fix Suggestion:
Update to version 2.3.4tensorflow-gpu (PYTHON):
Affected version(s) >=0.12.0rc0 <2.3.4Fix Suggestion:
Update to version 2.3.4tensorflow-gpu (PYTHON):
Affected version(s) >=2.4.0 <2.4.3Fix Suggestion:
Update to version 2.4.3tensorflow-gpu (PYTHON):
Affected version(s) =2.5.0 <2.5.1Fix Suggestion:
Update to version 2.5.1tensorflow (PYTHON):
Affected version(s) =2.5.0 <2.5.1Fix Suggestion:
Update to version 2.5.1tensorflow-cpu (PYTHON):
Affected version(s) =2.5.0 <2.5.1Fix Suggestion:
Update to version 2.5.1tensorflow (PYTHON):
Affected version(s) >=2.4.0 <2.4.3Fix Suggestion:
Update to version 2.4.3tensorflow-cpu (PYTHON):
Affected version(s) >=2.4.0 <2.4.3Fix Suggestion:
Update to version 2.4.3Additional Notes
The description of this vulnerability differs from MITRE.
Related Resources (7)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.5
Attack Vector
LOCAL
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.8
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
CVSS v2
Base Score:
4.6
Access Vector
LOCAL
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
Weakness Type (CWE)
Improper Input Validation
EPSS
Base Score:
0.01