Miggo Logo

CVE-2021-37689: Null pointer dereference in TFLite MLIR optimizations

7.8

CVSS Score
3.1

Basic Information

EPSS Score
0.1441%
Published
8/25/2021
Updated
11/13/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.3.42.3.4
tensorflowpip>= 2.4.0, < 2.4.32.4.3
tensorflowpip= 2.5.02.5.1
tensorflow-cpupip< 2.3.42.3.4
tensorflow-cpupip>= 2.4.0, < 2.4.32.4.3
tensorflow-cpupip= 2.5.02.5.1
tensorflow-gpupip< 2.3.42.3.4
tensorflow-gpupip>= 2.4.0, < 2.4.32.4.3
tensorflow-gpupip= 2.5.02.5.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems directly from the L2NormalizeReduceAxis function's implementation. The code checks axis values via *axis.getValues<int>().begin() without first verifying axis contains elements. The patch adds a guard clause checking axis.getNumElements() == 0, confirming this was the vulnerable code path. All vulnerability descriptions and commit diffs specifically reference this function as the source of the null dereference. No other functions are mentioned in the advisory materials as contributing to this vulnerability.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t *n *tt**k*r **n *r**t * T*Lit* mo**l t**t woul* tri***r * null point*r **r***r*n**, w*i** woul* r*sult in * *r*s* *n* **ni*l o* s*rvi**: T*is is **us** *y t** MLIR optimiz*tion o* `L*Norm*liz*R**u***xis` op*r*tor. T** [impl*m*nt*tion](*tt

Reasoning

T** vuln*r**ility st*ms *ir**tly *rom t** L*Norm*liz*R**u***xis *un*tion's impl*m*nt*tion. T** *o** ****ks *xis v*lu*s vi* **xis.**tV*lu*s<int>().***in() wit*out *irst v*ri*yin* *xis *ont*ins *l*m*nts. T** p*t** ***s * *u*r* *l*us* ****kin* *xis.**tN