CVE-2022-21728
published 2022-02-03CVE-2022-21728: Tensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `ReverseSequence` does not fully validate the value of…
PriorityP341high8.1CVSS 3.1
AVNACLPRLUINSUCHINAH
EPSS
1.13%
62.6th percentile
Tensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `ReverseSequence` does not fully validate the value of `batch_dim` and can result in a heap OOB read. There is a check to make sure the value of `batch_dim` does not go over the rank of the input, but there is no check for negative values. Negative dimensions are allowed in some cases to mimic Python's negative indexing (i.e., indexing from the end of the array), however if the value is too negative then the implementation of `Dim` would access elements before the start of an array. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
Affected
7 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | tensorflow | — | — |
| tensorflow | <= 2.5.2 | — | |
| tensorflow | — | — | |
| tensorflow | 2.6.0 – 2.6.2 | — | |
| intel | optimization_for_tensorflow | >= 0 < 2.5.3 | 2.5.3 |
| intel | optimization_for_tensorflow | >= 2.6.0 < 2.6.3 | 2.6.3 |
| intel | optimization_for_tensorflow | >= 2.7.0 < 2.7.1 | 2.7.1 |
CVSS provenance
nvdv3.18.1HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
nvdv2.05.5MEDIUMAV:N/AC:L/Au:S/C:P/I:N/A:P
vendor_debian8.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
Out of bounds read in Tensorflow
ghsa·2022-02-09
CVE-2022-21728 [HIGH] CWE-125 Out of bounds read in Tensorflow
Out of bounds read in Tensorflow
### Impact
The [implementation of shape inference for `ReverseSequence`](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/ops/array_ops.cc#L1636-L1671) does not fully validate the value of `batch_dim` and can result in a heap OOB read:
```python
import tensorflow as tf
@tf.function
def test():
y = tf.raw_ops.ReverseSequence(
input = ['aaa','bbb'],
seq_lengths = [1,1,1],
seq_dim = -10,
batch_dim = -10 )
return y
test()
```
There is a check to make sure the value of `batch_dim` does not go over the rank of the input, but there is no check for negative values:
```cc
const int32_t input_rank = c->Rank(input);
if (batch_dim >= input_rank) {
return errors::InvalidArgument(
"batch_dim must be Dim(input, b
OSV
Out of bounds read in Tensorflow
osv·2022-02-09
CVE-2022-21728 [HIGH] Out of bounds read in Tensorflow
Out of bounds read in Tensorflow
### Impact
The [implementation of shape inference for `ReverseSequence`](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/ops/array_ops.cc#L1636-L1671) does not fully validate the value of `batch_dim` and can result in a heap OOB read:
```python
import tensorflow as tf
@tf.function
def test():
y = tf.raw_ops.ReverseSequence(
input = ['aaa','bbb'],
seq_lengths = [1,1,1],
seq_dim = -10,
batch_dim = -10 )
return y
test()
```
There is a check to make sure the value of `batch_dim` does not go over the rank of the input, but there is no check for negative values:
```cc
const int32_t input_rank = c->Rank(input);
if (batch_dim >= input_rank) {
return errors::InvalidArgument(
"batch_dim must be Dim(input, b
OSV
CVE-2022-21728: Tensorflow is an Open Source Machine Learning Framework
osv·2022-02-03
CVE-2022-21728 CVE-2022-21728: Tensorflow is an Open Source Machine Learning Framework
Tensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `ReverseSequence` does not fully validate the value of `batch_dim` and can result in a heap OOB read. There is a check to make sure the value of `batch_dim` does not go over the rank of the input, but there is no check for negative values. Negative dimensions are allowed in some cases to mimic Python's negative indexing (i.e., indexing from the end of the array), however if the value is too negative then the implementation of `Dim` would access elements before the start of an array. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
Debian
CVE-2022-21728: tensorflow - Tensorflow is an Open Source Machine Learning Framework. The implementation of s...
vendor_debian·2022·CVSS 8.1
CVE-2022-21728 [HIGH] CVE-2022-21728: tensorflow - Tensorflow is an Open Source Machine Learning Framework. The implementation of s...
Tensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `ReverseSequence` does not fully validate the value of `batch_dim` and can result in a heap OOB read. There is a check to make sure the value of `batch_dim` does not go over the rank of the input, but there is no check for negative values. Negative dimensions are allowed in some cases to mimic Python's negative indexing (i.e., indexing from the end of the array), however if the value is too negative then the implementation of `Dim` would access elements before the start of an array. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
Scope: local
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/framework/shape_inference.h#L415-L428https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/ops/array_ops.cc#L1636-L1671https://github.com/tensorflow/tensorflow/commit/37c01fb5e25c3d80213060460196406c43d31995https://github.com/tensorflow/tensorflow/security/advisories/GHSA-6gmv-pjp9-p8w8https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/framework/shape_inference.h#L415-L428https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/ops/array_ops.cc#L1636-L1671https://github.com/tensorflow/tensorflow/commit/37c01fb5e25c3d80213060460196406c43d31995https://github.com/tensorflow/tensorflow/security/advisories/GHSA-6gmv-pjp9-p8w8
2022-02-03
Published