Miggo Logo

CVE-2020-26268: Write to immutable memory region in TensorFlow

4.4

CVSS Score
3.1

Basic Information

EPSS Score
0.12335%
Published
12/10/2020
Updated
10/28/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
tensorflowpip< 1.15.51.15.5
tensorflowpip>= 2.0.0, < 2.0.42.0.4
tensorflowpip>= 2.1.0, < 2.1.32.1.3
tensorflowpip>= 2.2.0, < 2.2.22.2.2
tensorflowpip>= 2.3.0, < 2.3.22.3.2
tensorflow-cpupip< 1.15.51.15.5
tensorflow-cpupip>= 2.0.0, < 2.0.42.0.4
tensorflow-cpupip>= 2.1.0, < 2.1.32.1.3
tensorflow-cpupip>= 2.2.0, < 2.2.22.2.2
tensorflow-cpupip>= 2.3.0, < 2.3.22.3.2
tensorflow-gpupip< 1.15.51.15.5
tensorflow-gpupip>= 2.0.0, < 2.0.42.0.4
tensorflow-gpupip>= 2.1.0, < 2.1.32.1.3
tensorflow-gpupip>= 2.2.0, < 2.2.22.2.2
tensorflow-gpupip>= 2.3.0, < 2.3.22.3.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the MemmappedTensorAllocator class in the ImmutableConstantOp implementation. The class's failure to override AllocatesOpaqueHandle() (which should return true for immutable buffers) allowed TensorFlow to incorrectly treat the memory-mapped region as writable. The patch explicitly adds this method to mark the allocator as returning opaque handles, preventing destructive writes. The file path and class are directly referenced in the commit diff and vulnerability description, confirming this as the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** `t*.r*w_ops.Immut**l**onst` op*r*tion r*turns * *onst*nt t*nsor *r**t** *rom * m*mory m*pp** *il* w*i** is *ssum** immut**l*. *ow*v*r, i* t** typ* o* t** t*nsor is not *n int**r*l typ*, t** op*r*tion *r*s**s t** Pyt*on int*rpr*t*r *s i

Reasoning

T** vuln*r**ility st*ms *rom t** `M*mm*pp**T*nsor*llo**tor` *l*ss in t** `Immut**l**onst*ntOp` impl*m*nt*tion. T** *l*ss's **ilur* to ov*rri** `*llo**t*sOp*qu***n*l*()` (w*i** s*oul* r*turn tru* *or immut**l* *u***rs) *llow** T*nsor*low to in*orr**tl