CVE-2021-41216
published 2021-11-05CVE-2021-41216: TensorFlow is an open source platform for machine learning. In affected versions the shape inference function for `Transpose` is vulnerable to a heap buffer…
PriorityP338high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EPSS
0.16%
5.2th percentile
TensorFlow is an open source platform for machine learning. In affected versions the shape inference function for `Transpose` is vulnerable to a heap buffer overflow. This occurs whenever `perm` contains negative elements. The shape inference function does not validate that the indices in `perm` are all valid. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
Affected
13 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | — | — | |
| tensorflow | >= 2.4.0 < 2.4.4 | 2.4.4 | |
| tensorflow | >= 2.5.0 < 2.5.2 | 2.5.2 | |
| tensorflow | >= 2.6.0 < 2.6.1 | 2.6.1 | |
| intel | optimization_for_tensorflow | >= 0 < c79ba87153ee343401dbe9d1954d7f79e521eb14 | c79ba87153ee343401dbe9d1954d7f79e521eb14 |
| intel | optimization_for_tensorflow | >= 0 < 2.4.4 | 2.4.4 |
| intel | optimization_for_tensorflow | >= 2.5.0 < 2.5.2 | 2.5.2 |
| 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 | < 2.4.4 | 2.4.4 |
| tensorflow | tensorflow | — | — |
| tensorflow | tensorflow | — | — |
CVSS provenance
nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.04.6MEDIUMAV:L/AC:L/Au:N/C:P/I:P/A:P
vendor_debian5.5LOW
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.
OSV
Heap buffer overflow in `Transpose`
osv·2021-11-10
CVE-2021-41216 [MEDIUM] Heap buffer overflow in `Transpose`
Heap buffer overflow in `Transpose`
### Impact
The [shape inference function for `Transpose`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/ops/array_ops.cc#L121-L185) is vulnerable to a heap buffer overflow:
```python
import tensorflow as tf
@tf.function
def test():
y = tf.raw_ops.Transpose(x=[1,2,3,4],perm=[-10])
return y
test()
```
This occurs whenever `perm` contains negative elements. The shape inference function does not validate that the indices in `perm` are all valid:
```cc
for (int32_t i = 0; i = rank) {
return errors::InvalidArgument("perm dim ", in_idx,
" is out of range of input rank ", rank);
}
dims[i] = c->Dim(input, in_idx);
}
```
where `Dim(tensor, index)` accepts either a positive index less than the rank of t
GHSA
Heap buffer overflow in `Transpose`
ghsa·2021-11-10
CVE-2021-41216 [MEDIUM] CWE-120 Heap buffer overflow in `Transpose`
Heap buffer overflow in `Transpose`
### Impact
The [shape inference function for `Transpose`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/ops/array_ops.cc#L121-L185) is vulnerable to a heap buffer overflow:
```python
import tensorflow as tf
@tf.function
def test():
y = tf.raw_ops.Transpose(x=[1,2,3,4],perm=[-10])
return y
test()
```
This occurs whenever `perm` contains negative elements. The shape inference function does not validate that the indices in `perm` are all valid:
```cc
for (int32_t i = 0; i = rank) {
return errors::InvalidArgument("perm dim ", in_idx,
" is out of range of input rank ", rank);
}
dims[i] = c->Dim(input, in_idx);
}
```
where `Dim(tensor, index)` accepts either a positive index less than the rank of t
OSV
CVE-2021-41216: TensorFlow is an open source platform for machine learning
osv·2021-11-05
CVE-2021-41216 CVE-2021-41216: TensorFlow is an open source platform for machine learning
TensorFlow is an open source platform for machine learning. In affected versions the shape inference function for `Transpose` is vulnerable to a heap buffer overflow. This occurs whenever `perm` contains negative elements. The shape inference function does not validate that the indices in `perm` are all valid. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
Debian
CVE-2021-41216: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 5.5
CVE-2021-41216 [MEDIUM] CVE-2021-41216: 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 function for `Transpose` is vulnerable to a heap buffer overflow. This occurs whenever `perm` contains negative elements. The shape inference function does not validate that the indices in `perm` are all valid. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
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/c79ba87153ee343401dbe9d1954d7f79e521eb14https://github.com/tensorflow/tensorflow/security/advisories/GHSA-3ff2-r28g-w7h9https://github.com/tensorflow/tensorflow/commit/c79ba87153ee343401dbe9d1954d7f79e521eb14https://github.com/tensorflow/tensorflow/security/advisories/GHSA-3ff2-r28g-w7h9
2021-11-05
Published