Miggo Logo

CVE-2023-25664: TensorFlow has Heap-buffer-overflow in AvgPoolGrad

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.21645%
Published
3/24/2023
Updated
3/27/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.11.12.11.1
tensorflow-cpupip< 2.11.12.11.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from missing input validation in the AvgPoolGrad implementation. The commit ddaac2b added validation loops using GetBroadcastSize to check kernel/stride compatibility before buffer operations. The original code proceeded to memory operations without these checks, allowing invalid parameter combinations to cause buffer overflows. The test case added in pooling_ops_test.py specifically targets stride validation, and the CWE-122 (heap overflow) classification confirms memory safety issues in gradient calculation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t ```pyt*on import os os.*nviron['T*_*N**L*_ON**NN_OPTS'] = '*' import t*nsor*low *s t* print(t*.__v*rsion__) wit* t*.**vi**("*PU"): ksiz* = [*, **, ***, *] stri**s = [*, ***, ***, **] p***in* = "S*M*" **t*_*orm*t = "N*W*"

Reasoning

T** vuln*r**ility st*ms *rom missin* input v*li**tion in t** *v*Pool*r** impl*m*nt*tion. T** *ommit ******* ***** v*li**tion loops usin* **t*ro****stSiz* to ****k k*rn*l/stri** *omp*ti*ility ***or* *u***r op*r*tions. T** ori*in*l *o** pro****** to m*