CVE-2021-41226
published 2021-11-05CVE-2021-41226: TensorFlow is an open source platform for machine learning. In affected versions the implementation of `SparseBinCount` is vulnerable to a heap OOB access…
PriorityP430high7.1CVSS 3.1
AVLACLPRLUINSUCHINAH
EPSS
0.20%
10.1th percentile
TensorFlow is an open source platform for machine learning. In affected versions the implementation of `SparseBinCount` is vulnerable to a heap OOB access. This is because of missing validation between the elements of the `values` argument and the shape of the sparse output. 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
12 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | < 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 < 2.4.4 | 2.4.4 |
| intel | optimization_for_tensorflow | >= 0 < f410212e373eb2aec4c9e60bf3702eba99a38aba | f410212e373eb2aec4c9e60bf3702eba99a38aba |
| 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.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.
OSV
Heap OOB in `SparseBinCount`
osv·2021-11-10
CVE-2021-41226 [MEDIUM] Heap OOB in `SparseBinCount`
Heap OOB in `SparseBinCount`
### Impact
The [implementation](https://github.com/tensorflow/tensorflow/blob/e71b86d47f8bc1816bf54d7bddc4170e47670b97/tensorflow/core/kernels/bincount_op.cc#L353-L417) of `SparseBinCount` is vulnerable to a heap OOB:
```python
import tensorflow as tf
tf.raw_ops.SparseBincount(
indices=[[0],[1],[2]]
values=[0,-10000000]
dense_shape=[1,1]
size=[1]
weights=[3,2,1]
binary_output=False)
```
This is because of missing validation between the elements of the `values` argument and the shape of the sparse output:
```cc
for (int64_t i = 0; i < indices_mat.dimension(0); ++i) {
const int64_t batch = indices_mat(i, 0);
const Tidx bin = values(i);
...
out(batch, bin) = ...;
}
```
### Patches
We have patched the issue in GitHub commit [f410212e373eb2aec4c9e60bf3702eba
GHSA
Heap OOB in `SparseBinCount`
ghsa·2021-11-10
CVE-2021-41226 [MEDIUM] CWE-125 Heap OOB in `SparseBinCount`
Heap OOB in `SparseBinCount`
### Impact
The [implementation](https://github.com/tensorflow/tensorflow/blob/e71b86d47f8bc1816bf54d7bddc4170e47670b97/tensorflow/core/kernels/bincount_op.cc#L353-L417) of `SparseBinCount` is vulnerable to a heap OOB:
```python
import tensorflow as tf
tf.raw_ops.SparseBincount(
indices=[[0],[1],[2]]
values=[0,-10000000]
dense_shape=[1,1]
size=[1]
weights=[3,2,1]
binary_output=False)
```
This is because of missing validation between the elements of the `values` argument and the shape of the sparse output:
```cc
for (int64_t i = 0; i < indices_mat.dimension(0); ++i) {
const int64_t batch = indices_mat(i, 0);
const Tidx bin = values(i);
...
out(batch, bin) = ...;
}
```
### Patches
We have patched the issue in GitHub commit [f410212e373eb2aec4c9e60bf3702eba
OSV
CVE-2021-41226: TensorFlow is an open source platform for machine learning
osv·2021-11-05
CVE-2021-41226 CVE-2021-41226: TensorFlow is an open source platform for machine learning
TensorFlow is an open source platform for machine learning. In affected versions the implementation of `SparseBinCount` is vulnerable to a heap OOB access. This is because of missing validation between the elements of the `values` argument and the shape of the sparse output. 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-41226: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 7.1
CVE-2021-41226 [HIGH] CVE-2021-41226: 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 implementation of `SparseBinCount` is vulnerable to a heap OOB access. This is because of missing validation between the elements of the `values` argument and the shape of the sparse output. 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.
https://github.com/tensorflow/tensorflow/commit/f410212e373eb2aec4c9e60bf3702eba99a38abahttps://github.com/tensorflow/tensorflow/security/advisories/GHSA-374m-jm66-3vj8https://github.com/tensorflow/tensorflow/commit/f410212e373eb2aec4c9e60bf3702eba99a38abahttps://github.com/tensorflow/tensorflow/security/advisories/GHSA-374m-jm66-3vj8
2021-11-05
Published