Miggo Logo

CVE-2022-35985:
TensorFlow vulnerable to `CHECK` fail in `LRNGrad`

5.9

CVSS Score

Basic Information

EPSS Score
-
Published
9/16/2022
Updated
1/28/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.7.22.7.2
tensorflowpip>= 2.8.0, < 2.8.12.8.1
tensorflowpip>= 2.9.0, < 2.9.12.9.1
tensorflow-cpupip< 2.7.22.7.2
tensorflow-cpupip>= 2.8.0, < 2.8.12.8.1
tensorflow-cpupip>= 2.9.0, < 2.9.12.9.1
tensorflow-gpupip< 2.7.22.7.2
tensorflow-gpupip>= 2.8.0, < 2.8.12.8.1
tensorflow-gpupip>= 2.9.0, < 2.9.12.9.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the LRNGradOp implementation where dimension count validation was incomplete. The commit diff shows the critical fix added 'out_image.dims() == 4' to the validation checks. The original code only verified dimension sizes matched input tensors but didn't enforce the 4D requirement explicitly. This matches the vulnerability description where non-4D output_image triggers a CHECK failure. The affected function is clearly identified in the kernel code where the validation occurs.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t I* `LRN*r**` is *iv*n *n `output_im***` input t*nsor t**t is not *-*, it r*sults in * `****K` **il t**t **n ** us** to tri***r * **ni*l o* s*rvi** *tt**k. ```pyt*on import t*nsor*low *s t* **pt*_r**ius = * *i*s = *.******** *lp** = *.*****

Reasoning

T** vuln*r**ility st*ms *rom t** LRN*r**Op impl*m*nt*tion w**r* *im*nsion *ount v*li**tion w*s in*ompl*t*. T** *ommit *i** s*ows t** *riti**l *ix ***** 'out_im***.*ims() == *' to t** v*li**tion ****ks. T** ori*in*l *o** only v*ri*i** *im*nsion siz*s