CVE-2021-41211
published 2021-11-05CVE-2021-41211: TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `QuantizeV2` can trigger a read outside of bounds…
PriorityP431high7.1CVSS 3.1
AVLACLPRLUINSUCHINAH
EPSS
0.20%
10.1th percentile
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `QuantizeV2` can trigger a read outside of bounds of heap allocated array. This occurs whenever `axis` is a negative value less than `-1`. In this case, we are accessing data before the start of a heap buffer. The code allows `axis` to be an optional argument (`s` would contain an `error::NOT_FOUND` error code). Otherwise, it assumes that `axis` is a valid index into the dimensions of the `input` tensor. If `axis` is less than `-1` then this results in a heap OOB read. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, as this version is the only one that is also affected.
Affected
6 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | — | — | |
| intel | optimization_for_tensorflow | >= 0 < a0d64445116c43cf46a5666bd4eee28e7a82f244 | a0d64445116c43cf46a5666bd4eee28e7a82f244 |
| intel | optimization_for_tensorflow | >= 2.6.0 < 2.6.1 | 2.6.1 |
| intel | optimization_for_tensorflow | >= 2.7.0rc0 < 2.7.0 | 2.7.0 |
| tensorflow | tensorflow | — | — |
CVSS provenance
nvdv3.17.1HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
nvdv2.03.6LOWAV:L/AC:L/Au:N/C:P/I:N/A:P
vendor_debian7.1LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Heap OOB in shape inference for `QuantizeV2`
ghsa·2021-11-10
CVE-2021-41211 [HIGH] CWE-125 Heap OOB in shape inference for `QuantizeV2`
Heap OOB in shape inference for `QuantizeV2`
### Impact
The [shape inference code for `QuantizeV2`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/framework/common_shape_fns.cc#L2509-L2530) can trigger a read outside of bounds of heap allocated array:
```python
import tensorflow as tf
@tf.function
def test():
data=tf.raw_ops.QuantizeV2(
input=[1.0,1.0],
min_range=[1.0,10.0],
max_range=[1.0,10.0],
T=tf.qint32,
mode='MIN_COMBINED',
round_mode='HALF_TO_EVEN',
narrow_range=False,
axis=-100,
ensure_minimum_range=10)
return data
test()
```
This occurs whenever `axis` is a negative value less than `-1`. In this case, we are accessing data before the start of a heap buffer:
```cc
int axis = -1;
Status s = c->GetAttr("axis", &axis);
if (
OSV
Heap OOB in shape inference for `QuantizeV2`
osv·2021-11-10
CVE-2021-41211 [HIGH] Heap OOB in shape inference for `QuantizeV2`
Heap OOB in shape inference for `QuantizeV2`
### Impact
The [shape inference code for `QuantizeV2`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/framework/common_shape_fns.cc#L2509-L2530) can trigger a read outside of bounds of heap allocated array:
```python
import tensorflow as tf
@tf.function
def test():
data=tf.raw_ops.QuantizeV2(
input=[1.0,1.0],
min_range=[1.0,10.0],
max_range=[1.0,10.0],
T=tf.qint32,
mode='MIN_COMBINED',
round_mode='HALF_TO_EVEN',
narrow_range=False,
axis=-100,
ensure_minimum_range=10)
return data
test()
```
This occurs whenever `axis` is a negative value less than `-1`. In this case, we are accessing data before the start of a heap buffer:
```cc
int axis = -1;
Status s = c->GetAttr("axis", &axis);
if (
OSV
CVE-2021-41211: TensorFlow is an open source platform for machine learning
osv·2021-11-05
CVE-2021-41211 CVE-2021-41211: TensorFlow is an open source platform for machine learning
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `QuantizeV2` can trigger a read outside of bounds of heap allocated array. This occurs whenever `axis` is a negative value less than `-1`. In this case, we are accessing data before the start of a heap buffer. The code allows `axis` to be an optional argument (`s` would contain an `error::NOT_FOUND` error code). Otherwise, it assumes that `axis` is a valid index into the dimensions of the `input` tensor. If `axis` is less than `-1` then this results in a heap OOB read. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, as this version is the only one that is also affected.
Debian
CVE-2021-41211: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 7.1
CVE-2021-41211 [HIGH] CVE-2021-41211: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `QuantizeV2` can trigger a read outside of bounds of heap allocated array. This occurs whenever `axis` is a negative value less than `-1`. In this case, we are accessing data before the start of a heap buffer. The code allows `axis` to be an optional argument (`s` would contain an `error::NOT_FOUND` error code). Otherwise, it assumes that `axis` is a valid index into the dimensions of the `input` tensor. If `axis` is less than `-1` then this results in a heap OOB read. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, as this version is the only one that is also affected.
Scope: local
forky: resolved
sid: resolved
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/commit/a0d64445116c43cf46a5666bd4eee28e7a82f244https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cvgx-3v3q-m36chttps://github.com/tensorflow/tensorflow/commit/a0d64445116c43cf46a5666bd4eee28e7a82f244https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cvgx-3v3q-m36c
2021-11-05
Published