Miggo Logo

CVE-2022-35981: TensorFlow vulnerable to `CHECK` fail in `FractionalMaxPoolGrad`

5.9

CVSS Score
3.1

Basic Information

EPSS Score
0.42671%
Published
9/16/2022
Updated
1/28/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

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

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two specific checks in FractionalMaxPoolGradOp's Compute method:

  1. A DCHECK_EQ comparing tensor_out_dup_mat and tensor_out_mat values
  2. A CHECK validating input_backprop_index range

These were replaced in the patch with OP_REQUIRES context checks that return proper errors instead of crashing. The commit diff clearly shows these security-critical validations were previously implemented as fatal CHECK/DCHECK assertions rather than recoverable errors, matching the vulnerability description of using CHECK failures for input validation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t `*r**tion*lM*xPool*r**` v*li**t*s its inputs wit* `****K` **ilur*s inst*** o* wit* r*turnin* *rrors. I* it **ts in*orr**tly siz** inputs, t** `****K` **ilur* **n ** us** to tri***r * **ni*l o* s*rvi** *tt**k: ```pyt*on import t*nsor*low *s

Reasoning

T** vuln*r**ility st*ms *rom two sp**i*i* ****ks in *r**tion*lM*xPool*r**Op's *omput* m*t*o*: *. * *****K_*Q *omp*rin* t*nsor_out_*up_m*t *n* t*nsor_out_m*t v*lu*s *. * ****K v*li**tin* input_***kprop_in**x r*n** T**s* w*r* r*pl**** in t** p*t** wit