CVE-2021-41215
published 2021-11-05CVE-2021-41215: TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `DeserializeSparse` can trigger a null pointer…
PriorityP419medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.18%
8.0th percentile
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `DeserializeSparse` can trigger a null pointer dereference. This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). 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 | — | — | |
| tensorflow | >= 2.5.0 < 2.5.2 | 2.5.2 | |
| intel | optimization_for_tensorflow | >= 0 < 2.4.4 | 2.4.4 |
| intel | optimization_for_tensorflow | >= 0 < d3738dd70f1c9ceb547258cbb82d853da8771850 | d3738dd70f1c9ceb547258cbb82d853da8771850 |
| 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.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvdv2.02.1LOWAV:L/AC:L/Au:N/C:N/I:N/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
Null pointer exception in `DeserializeSparse`
osv·2021-11-10
CVE-2021-41215 [MEDIUM] Null pointer exception in `DeserializeSparse`
Null pointer exception in `DeserializeSparse`
### Impact
The [shape inference code for `DeserializeSparse`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/ops/sparse_ops.cc#L152-L168) can trigger a null pointer dereference:
```python
import tensorflow as tf
dataset = tf.data.Dataset.range(3)
@tf.function
def test():
y = tf.raw_ops.DeserializeSparse(
serialized_sparse=tf.data.experimental.to_variant(dataset),
dtype=tf.int32)
test()
```
This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). However, in the example above, the argument is a scalar (i.e., rank 0).
### Patches
We have patched the issue in GitHub commit [d3738dd70f1
GHSA
Null pointer exception in `DeserializeSparse`
ghsa·2021-11-10
CVE-2021-41215 [MEDIUM] CWE-476 Null pointer exception in `DeserializeSparse`
Null pointer exception in `DeserializeSparse`
### Impact
The [shape inference code for `DeserializeSparse`](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/ops/sparse_ops.cc#L152-L168) can trigger a null pointer dereference:
```python
import tensorflow as tf
dataset = tf.data.Dataset.range(3)
@tf.function
def test():
y = tf.raw_ops.DeserializeSparse(
serialized_sparse=tf.data.experimental.to_variant(dataset),
dtype=tf.int32)
test()
```
This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). However, in the example above, the argument is a scalar (i.e., rank 0).
### Patches
We have patched the issue in GitHub commit [d3738dd70f1
OSV
CVE-2021-41215: TensorFlow is an open source platform for machine learning
osv·2021-11-05
CVE-2021-41215 CVE-2021-41215: 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 `DeserializeSparse` can trigger a null pointer dereference. This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). 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-41215: tensorflow - TensorFlow is an open source platform for machine learning. In affected versions...
vendor_debian·2021·CVSS 5.5
CVE-2021-41215 [MEDIUM] CVE-2021-41215: 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 `DeserializeSparse` can trigger a null pointer dereference. This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). 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/d3738dd70f1c9ceb547258cbb82d853da8771850https://github.com/tensorflow/tensorflow/security/advisories/GHSA-x3v8-c8qx-3j3rhttps://github.com/tensorflow/tensorflow/commit/d3738dd70f1c9ceb547258cbb82d853da8771850https://github.com/tensorflow/tensorflow/security/advisories/GHSA-x3v8-c8qx-3j3r
2021-11-05
Published