Skip to main content
← All vulnerabilities
CVE-2021-37687GHSA-JWF9-W5XM-F437BIT-TENSORFLOW-2021-37687PYSEC-2021-309PYSEC-2021-600PYSEC-2021-798

Heap OOB in TensorFlow Lite's `Gather*` implementations

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.5.1, 2.4.3, 2.3.4
None on Exploit-DB, Metasploit or GitHub

Summary

TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's `GatherNd` implementation does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in `Gather` implementation. We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • tensorflow tensorflow

    From 2.5.0 · fixed in 2.5.1; From 2.4.0 · fixed in 2.4.3; fixed in 2.3.4

  • tensorflowPyPI

    fixed in 2.3.4

  • tensorflowPyPI

    From 2.4.0 · fixed in 2.4.3

  • tensorflowPyPI

    From 2.5.0 · fixed in 2.5.1

  • tensorflow-cpuPyPI

    fixed in 2.3.4

  • tensorflow-cpuPyPI

    From 2.4.0 · fixed in 2.4.3

  • tensorflow-cpuPyPI

    From 2.5.0 · fixed in 2.5.1

  • tensorflow-gpuPyPI

    fixed in 2.3.4

  • tensorflow-gpuPyPI

    From 2.4.0 · fixed in 2.4.3

  • tensorflow-gpuPyPI

    From 2.5.0 · fixed in 2.5.1

  • tensorflow-gpuPyPI

    From 2.3.0 · fixed in 2.3.4; From 2.4.0 · fixed in 2.4.3

  • tensorflow-cpuPyPI

    From 2.3.0 · fixed in 2.3.4; From 2.4.0 · fixed in 2.4.3

  • tensorflowPyPI

    From 2.3.0 · fixed in 2.3.4; From 2.4.0 · fixed in 2.4.3

References 3

GitHub · tensorflow/tensorflow