Skip to content
HighVulnerability

CVE-2020-15212: TensorFlow Lite out-of-bounds write in segment sum via negative segment ids

Identifier
CVE-2020-15212
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 write outside the bounds of heap-allocated buffers when the segment ids tensor contains negative elements. Users with access to `segment_ids_data` can alter `output_index` and write beyond the `output_data` buffer, which may cause a segmentation fault or further memory corruption that can be chained with other vulnerabilities.

Mitigation

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