Integer overflow in Google Tensorflow
CVE-2021-29605
TensorFlow is an end-to-end open source platform for machine learning. The TFLite code for allocating `TFLiteIntArray`s is vulnerable to an integer overflow issue(https://github.com/tensorflow/tensorflow/blob/4ceffae632721e52bf3501b736e4fe9d1221cdfa/tensorflow/lite/c/common.c#L24-L27). An attacker can craft a model such that the `size` multiplier is so large that the return value overflows the `int` datatype and becomes negative. In turn, this results in invalid value being given to `malloc`(https://github.com/tensorflow/tensorflow/blob/4ceffae632721e52bf3501b736e4fe9d1221cdfa/tensorflow/lite/c/common.c#L47-L52). In this case, `ret->size` would dereference an invalid pointer. 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.
Vulnerability class: Integer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.1 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
EPSS exploit prediction
EPSS: 0.002 (11.3th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 11th percentile — 11.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.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3
Weakness classification (CWE)
Public proof-of-concept exploits
References
- github.com/tensorflow/tensorflow/security/advisories/GHSA-jf7h-7m85-w2v2 (Exploit, Patch, Third Party Advisory)
- github.com/tensorflow/tensorflow/commit/7c8cc4ec69cd348e44ad6a2699057ca88faad3e5 (Patch, Third Party Advisory)
Frequently asked questions
- What is CVE-2021-29605?
- CVE-2021-29605 is a high-severity vulnerability in Google Tensorflow, classified under Integer Overflow or Wraparound. CVSS score: 7.1/10. Published 2021-05-14.
- How severe is CVE-2021-29605?
- High severity. CVSS v3 base score is 7.1 out of 10.
- Is CVE-2021-29605 known to be exploited?
- 1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.