Skip to content
HighVulnerability

CVE-2020-15214: TensorFlow Lite out of bounds write in segment sum with unsorted segment ids

Identifier
CVE-2020-15214
Published
Record updated
View JSON
Affected
  • tensorflow = 2.2.0, fixed in 2.2.1, released September 24, 2020, 1 day before disclosure
  • tensorflow = 2.3.0, fixed in 2.3.1, released September 24, 2020, 1 day before disclosure
  • tensorflow-cpu = 2.2.0, fixed in 2.2.1, released September 24, 2020, 1 day before disclosure
  • and 3 more
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.7%

Summary

In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger a write out of bounds or a segmentation fault when segment ids are not sorted. The code assumes increasing order and sizes the output tensor from the last element, so it allocates too little memory and writes past the output array. The write can serve as a write gadget in future memory corruption exploits.

Mitigation

Fixed in TensorFlow versions 2.2.1 and 2.3.1 (patch commit 204945b19e44b57906c9344c0d00120eeeae178a). Workaround for statically stored segment ids: add a custom `Verifier` to the model loading code to ensure the segment ids are sorted. A similar validation can be run on segment ids generated at runtime between inference steps. If segment ids are generated as outputs of a tensor during inference, there is no workaround and users should upgrade to patched code.