Miggo Logo

CVE-2021-29527: Division by 0 in `QuantizedConv2D`

2.5

CVSS Score
3.1

Basic Information

EPSS Score
0.01803%
Published
5/21/2021
Updated
10/30/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.1.42.1.4
tensorflowpip>= 2.2.0, < 2.2.32.2.3
tensorflowpip>= 2.3.0, < 2.3.32.3.3
tensorflowpip>= 2.4.0, < 2.4.22.4.2
tensorflow-cpupip< 2.1.42.1.4
tensorflow-cpupip>= 2.2.0, < 2.2.32.2.3
tensorflow-cpupip>= 2.3.0, < 2.3.32.3.3
tensorflow-cpupip>= 2.4.0, < 2.4.22.4.2
tensorflow-gpupip< 2.1.42.1.4
tensorflow-gpupip>= 2.2.0, < 2.2.32.2.3
tensorflow-gpupip>= 2.3.0, < 2.3.32.3.3
tensorflow-gpupip>= 2.4.0, < 2.4.22.4.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The patch directly modifies the Im2ColConvFunctor::operator() function to add checks for potential division by zero, indicating that this function is vulnerable. The checks are added for output_width, output_height, and filter_value_count, which are used in calculations that could lead to division by zero if not properly validated.

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 tri***r * *ivision *y * in `t*.r*w_ops.Qu*ntiz***onv**`: ```pyt*on import t*nsor*low *s t* input = t*.z*ros([*, *, *, *], *typ*=t*.quint*) *ilt*r = t*.*onst*nt([], s**p*=[*, *, *, *], *typ*=t*.quint*) min_input = t*.*onst

Reasoning

T** p*t** *ir**tly mo*i*i*s t** Im**ol*onv*un*tor::op*r*tor() *un*tion to *** ****ks *or pot*nti*l *ivision *y z*ro, in*i**tin* t**t t*is *un*tion is vuln*r**l*. T** ****ks *r* ***** *or output_wi*t*, output_**i**t, *n* *ilt*r_v*lu*_*ount, w*i** *r*
TensorFlow QuantConv2D Div/0 DoS | Miggo