Miggo Logo

CVE-2022-23566: Out of bounds write in Tensorflow

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.581%
Published
2/9/2022
Updated
11/13/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 2.5.32.5.3
tensorflowpip>= 2.6.0, < 2.6.32.6.3
tensorflowpip= 2.7.02.7.1
tensorflow-cpupip< 2.5.32.5.3
tensorflow-cpupip>= 2.6.0, < 2.6.32.6.3
tensorflow-cpupip= 2.7.02.7.1
tensorflow-gpupip< 2.5.32.5.3
tensorflow-gpupip>= 2.6.0, < 2.6.32.6.3
tensorflow-gpupip= 2.7.02.7.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability occurs because SetUnknownShape in graph_properties.cc calls set_output() without validating the output_port parameter. The patch adds explicit bounds checking for output_port against ctx->num_outputs(), confirming this was the missing safeguard. set_output() in shape_inference.h is the direct location of the OOB write operation. Both functions are integral to the vulnerability: SetUnknownShape for lacking validation, and set_output for performing the unsafe write. The high confidence comes from the explicit patch adding validation in SetUnknownShape and the documented impact of providing a write primitive.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T*nsor*low is vuln*r**l* to * ***p OO* writ* in [*r*ppl*r](*ttps://*it*u*.*om/t*nsor*low/t*nsor*low/*lo*/****************************************/t*nsor*low/*or*/*r*ppl*r/*osts/*r*p*_prop*rti*s.**#L****-L****): ```** St*tus S*tUnknownS**p

Reasoning

T** vuln*r**ility o**urs ****us* S*tUnknownS**p* in *r*p*_prop*rti*s.** **lls s*t_output() wit*out v*li**tin* t** output_port p*r*m*t*r. T** p*t** ***s *xpli*it *oun*s ****kin* *or output_port ***inst *tx->num_outputs(), *on*irmin* t*is w*s t** missi