Miggo Logo

CVE-2022-29209: Type confusion leading to `CHECK`-failure based denial of service in TensorFlow

5.5

CVSS Score
3.1

Basic Information

EPSS Score
0.24125%
Published
5/24/2022
Updated
1/30/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from type confusion in CHECK_OP macros when comparing size_t (unsigned) and int (signed) values. The original implementations in logging.h contained specific overloads for (size_t, int) and (int, size_t) comparisons that improperly handled negative values and integer ranges. The commit diff shows these functions were replaced with safer implementations that add explicit checks for negative values and proper type conversions. The vulnerable functions are the pre-patch implementations of various Check_*Impl macros that handled mixed size_t/int comparisons without proper validation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** [m**ros t**t T*nsor*low us*s *or writin* *ss*rtions (*.*., `****K_LT`, `****K_*T`, *t*.)](*ttps://*it*u*.*om/t*nsor*low/t*nsor*low/*lo*/****************************************/t*nsor*low/*or*/pl*t*orm/****ult/lo**in*.*) **v* *n in*orr

Reasoning

T** vuln*r**ility st*ms *rom typ* *on*usion in ****K_OP m**ros w**n *omp*rin* siz*_t (unsi*n**) *n* int (si*n**) v*lu*s. T** ori*in*l impl*m*nt*tions in lo**in*.* *ont*in** sp**i*i* ov*rlo**s *or (siz*_t, int) *n* (int, siz*_t) *omp*risons t**t impro