Integer overflow in Google Tensorflow
CVE-2021-41195
TensorFlow is an open source platform for machine learning. In affected versions the implementation of `tf.math.segment_*` operations results in a `CHECK`-fail related abort (and denial of service) if a segment id in `segment_ids` is large. This is similar to CVE-2021-29584 (and similar other reported vulnerabilities in TensorFlow, localized to specific APIs): the implementation (both on CPU and GPU) computes the output shape using `AddDim`. However, if the number of elements in the tensor overflows an `int64_t` value, `AddDim` results in a `CHECK` failure which provokes a `std::abort`. Instead, code should use `AddDimWithStatus`. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
Vulnerability class: Integer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS: 0.002 (10.3th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 10th percentile — 10.3% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.002 · newest: 0.002 · change: 0.000
Affected products
- Google Tensorflow
- Tensorflow — versions >= 2.6.0, < 2.6.1, >= 2.5.0, < 2.5.2, < 2.4.4
Weakness classification (CWE)
References
- github.com/tensorflow/tensorflow/security/advisories/GHSA-cq76-mxrc-vchh (Exploit, Third Party Advisory)
- github.com/tensorflow/tensorflow/issues/46888 (Patch, Third Party Advisory)
- github.com/tensorflow/tensorflow/pull/51733 (Patch, Third Party Advisory)
- github.com/tensorflow/tensorflow/commit/e9c81c1e1a9cd8dd31f4e83676cab61b60658429 (Patch, Third Party Advisory)
Frequently asked questions
- What is CVE-2021-41195?
- CVE-2021-41195 is a medium-severity vulnerability in Google Tensorflow, classified under Integer Overflow or Wraparound. CVSS score: 5.5/10. Published 2021-11-05.
- How severe is CVE-2021-41195?
- Medium severity. CVSS v3 base score is 5.5 out of 10.