Skip to content
MediumVulnerability

CVE-2020-15211: TensorFlow Lite out-of-bounds read and write via negative tensor index

Identifier
CVE-2020-15211
Published
Record updated
View JSON
Affected
  • tensorflow < 1.15.4, fixed in 1.15.4, released September 24, 2020, 1 day before disclosure
  • tensorflow >= 2.0.0, < 2.0.3, fixed in 2.0.3, released September 24, 2020, 1 day before disclosure
  • tensorflow >= 2.1.0, < 2.1.2, fixed in 2.1.2, released September 24, 2020, 1 day before disclosure
  • and 12 more
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.9%

Summary

CVE-2020-15211 affects TensorFlow Lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1. The flatbuffer model format treats a tensor index of -1 as an optional tensor, but validation accepts it for any operator, including outputs. This lets a crafted model read and write outside the bounds of heap-allocated arrays, at a specific offset from the start of those arrays, giving limited read and write primitives.

Mitigation

Fixed in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, via commits 46d5b0852, 00302787b7, e11f5558, cd31fd0ce, 1970c21 and fff2c83. Workaround: add a custom Verifier to the model loading code so that only operators accepting optional inputs use the -1 value, and only for the tensors they expect to be optional. The source advises upgrading to the patched code instead, since the allow-list approach is error-prone.