Miggo Logo

CVE-2021-29539: Segfault in tf.raw_ops.ImmutableConst

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 vulnerability stems from the ImmutableConstantOp constructor's failure to validate() prohibited dtypes (resource/variant). The patch explicitly adds an OP_REQUIRES check for these dtypes, confirming this was the vulnerable code path. The file modification in the commit directly addresses this missing validate() in the constructor.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t **llin* [`t*.r*w_ops.Immut**l**onst`](*ttps://www.t*nsor*low.or*/*pi_*o*s/pyt*on/t*/r*w_ops/Immut**l**onst) wit* * `*typ*` o* `t*.r*sour**` or `t*.v*ri*nt` r*sults in * s****ult in t** impl*m*nt*tion *s *o** *ssum*s t**t t** t*nsor *ont*nt

Reasoning

T** vuln*r**ility st*ms *rom t** `Immut**l**onst*ntOp` *onstru*tor's **ilur* to `v*li**t*()` pro*i*it** *typ*s (r*sour**/v*ri*nt). T** p*t** *xpli*itly ***s *n `OP_R*QUIR*S` ****k *or t**s* *typ*s, *on*irmin* t*is w*s t** vuln*r**l* *o** p*t*. T** *i