Miggo Logo

CVE-2022-29202: Denial of service in `tf.ragged.constant` due to lack of validation

5.5

CVSS Score
3.1

Basic Information

EPSS Score
0.15909%
Published
5/24/2022
Updated
7/21/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 the unvalidated 'ragged_rank' parameter in the _constant_value function. The commit bd4d558 explicitly adds a check comparing 'ragged_rank' against 'max_depth' (input nesting depth) to prevent invalid configurations. Prior to this fix, the absence of this validation allowed attackers to trigger a memory exhaustion DoS by providing a 'ragged_rank' exceeding the input's actual nesting depth. The function is directly referenced in the vulnerability description and commit diff, confirming its role.

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* [`t*.r*****.*onst*nt`](*ttps://*it*u*.*om/t*nsor*low/t*nsor*low/*lo*/****************************************/t*nsor*low/pyt*on/ops/r*****/r*****_***tory_ops.py#L***-L***) *o*s not *ully v*li**t* t** input *r*um*nts.

Reasoning

T** vuln*r**ility st*ms *rom t** unv*li**t** 'r*****_r*nk' p*r*m*t*r in t** _*onst*nt_v*lu* *un*tion. T** *ommit ******* *xpli*itly ***s * ****k *omp*rin* 'r*****_r*nk' ***inst 'm*x_**pt*' (input n*stin* **pt*) to pr*v*nt inv*li* *on*i*ur*tions. Prio