VYPR
High severityNVD Advisory· Published Aug 12, 2021· Updated Aug 4, 2024

Null pointer dereference in TensorFlow Lite

CVE-2021-37688

Description

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service. The implementation unconditionally dereferences a pointer. We have patched the issue in GitHub commit 15691e456c7dc9bd6be203b09765b063bf4a380c. 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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.3.42.3.4
tensorflowPyPI
>= 2.4.0, < 2.4.32.4.3
tensorflowPyPI
>= 2.5.0, < 2.5.12.5.1
tensorflow-cpuPyPI
>= 2.5.0, < 2.5.12.5.1
tensorflow-cpuPyPI
>= 2.4.0, < 2.4.32.4.3
tensorflow-cpuPyPI
< 2.3.42.3.4
tensorflow-gpuPyPI
< 2.3.42.3.4
tensorflow-gpuPyPI
>= 2.4.0, < 2.4.32.4.3
tensorflow-gpuPyPI
>= 2.5.0, < 2.5.12.5.1

Affected products

1

Patches

1
15691e456c7d

Prevent dereferencing of null pointers in TFLite's `add.cc`.

https://github.com/tensorflow/tensorflowMihai MaruseacJul 28, 2021via ghsa
1 file changed · +1 1
  • tensorflow/lite/kernels/internal/optimized/optimized_ops.h+1 1 modified
    @@ -265,7 +265,7 @@ inline void BinaryBroadcastFiveFold(const ArithmeticParams& unswitched_params,
           // We have broadcast y2*y3*y4 of input2 data y1 times, and now move on.
           input2_data_reset = input2_data_ptr;
         }
    -  } else {
    +  } else if (input1_data_ptr != nullptr) {
         // Special case of y4 == 1, in which the innermost loop is a single
         // element and can be combined with the next (y3) as an inner broadcast.
         //
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.