Miggo Logo

CVE-2022-21734: `CHECK`-failures in Tensorflow

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.43492%
Published
2/10/2022
Updated
11/13/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.5.32.5.3
tensorflowpip>= 2.6.0, < 2.6.32.6.3
tensorflowpip= 2.7.02.7.1
tensorflow-cpupip< 2.5.32.5.3
tensorflow-cpupip>= 2.6.0, < 2.6.32.6.3
tensorflow-cpupip= 2.7.02.7.1
tensorflow-gpupip< 2.5.32.5.3
tensorflow-gpupip>= 2.6.0, < 2.6.32.6.3
tensorflow-gpupip= 2.7.02.7.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from missing validation in the MapStageOp's Compute function where non-scalar key tensors would trigger CHECK failures. The commit f573155 added an explicit check (OP_REQUIRES) for key tensor scalar validation. The original code in map_stage_op.cc only checked for non-empty keys but not scalar shape. The test cases added in map_stage_op_test.py validate this fix by testing non-scalar key rejection.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** [impl*m*nt*tion o* `M*pSt***`](*ttps://*it*u*.*om/t*nsor*low/t*nsor*low/*lo*/****************************************/t*nsor*low/*or*/k*rn*ls/m*p_st***_op.**#L***-L***) is vuln*r**l* * `****K`-**il i* t** k*y t*nsor is not * s**l*r:

Reasoning

T** vuln*r**ility st*ms *rom missin* v*li**tion in t** M*pSt***Op's *omput* *un*tion w**r* non-s**l*r k*y t*nsors woul* tri***r ****K **ilur*s. T** *ommit ******* ***** *n *xpli*it ****k (OP_R*QUIR*S) *or k*y t*nsor s**l*r v*li**tion. T** ori*in*l *o