Intel Optimization For Tensorflow vulnerabilities
429 known vulnerabilities affecting intel/optimization_for_tensorflow.
Total CVEs
429
CISA KEV
0
Public exploits
0
Exploited in wild
0
Severity breakdown
CRITICAL5HIGH121MEDIUM200LOW103
Vulnerabilities
Page 2 of 22
CVE-2023-25672HIGH≥ 0, < 2.11.12023-03-24
CVE-2023-25672 [HIGH] CWE-476 TensorFlow has Null Pointer Error in LookupTableImportV2
TensorFlow has Null Pointer Error in LookupTableImportV2
### Impact
The function `tf.raw_ops.LookupTableImportV2` cannot handle scalars in the `values` parameter and gives an NPE.
```python
import tensorflow as tf
v = tf.Variable(1)
@tf.function(jit_compile=True)
def test():
func = tf.raw_ops.LookupTableImportV2
para={'table_handle': v.handle,'keys': [62.98910140991211, 94.36528015136719], 'values': -919}
ghsaosv
CVE-2023-25660HIGH≥ 0, < 2.11.12023-03-24
CVE-2023-25660 [HIGH] CWE-476 TensorFlow vulnerable to seg fault in `tf.raw_ops.Print`
TensorFlow vulnerable to seg fault in `tf.raw_ops.Print`
### Impact
When the parameter `summarize` of `tf.raw_ops.Print` is zero, the new method `SummarizeArray` will reference to a nullptr, leading to a seg fault.
```python
import tensorflow as tf
tf.raw_ops.Print(input = tf.constant([1, 1, 1, 1],dtype=tf.int32),
data = [[False, False, False, False], [False], [False, False, False]],
message = 'tmp/I',
firs
ghsaosv
CVE-2023-25674HIGH≥ 0, < 2.11.12023-03-24
CVE-2023-25674 [HIGH] CWE-476 TensorFlow has Null Pointer Error in RandomShuffle with XLA enable
TensorFlow has Null Pointer Error in RandomShuffle with XLA enable
### Impact
NPE in RandomShuffle with XLA enable
```python
import tensorflow as tf
func = tf.raw_ops.RandomShuffle
para = {'value': 1e+20, 'seed': -4294967297, 'seed2': -2147483649}
@tf.function(jit_compile=True)
def test():
y = func(**para)
return y
test()
```
### Patches
We have patched the issue in GitHub commit [728113a3be690f
ghsaosv
CVE-2023-25667MEDIUM≥ 0, < 2.11.12023-03-24
CVE-2023-25667 [MEDIUM] CWE-190 TensorFlow vulnerable to segfault when opening multiframe gif
TensorFlow vulnerable to segfault when opening multiframe gif
### Impact
Integer overflow occurs when 2^31 <= num_frames * height * width * channels < 2^32, for example Full HD screencast of at least 346 frames.
```python
import urllib.request
dat = urllib.request.urlopen('https://raw.githubusercontent.com/tensorflow/tensorflow/1c38ad9b78ffe06076745a1ee00cec42f39ff726/tensorflow/core/lib/gif/testdata/3
ghsaosv
CVE-2022-41880MEDIUM≥ 2.10.0, < 2.10.1≥ 0, < 2.8.4+1 more2022-11-22
CVE-2022-41880 [MEDIUM] CWE-125 Tensorflow vulnerable to Out-of-Bounds Read
Tensorflow vulnerable to Out-of-Bounds Read
### Impact
When the [`BaseCandidateSamplerOp`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/candidate_sampler_ops.cc) function receives a value in `true_classes` larger than `range_max`, a heap oob vuln occurs.
```python
tf.raw_ops.ThreadUnsafeUnigramCandidateSampler(
true_classes=[[0x100000,1]],
num_true = 2,
num_sampled = 2,
unique = False,
ra
ghsaosv
CVE-2022-41900HIGH≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41900 [HIGH] CWE-125 FractionalMaxPool and FractionalAVGPool heap out-of-bounds acess
FractionalMaxPool and FractionalAVGPool heap out-of-bounds acess
### Impact
An input `pooling_ratio` that is smaller than 1 will trigger a heap OOB in [`tf.raw_ops.FractionalMaxPool`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/fractional_max_pool_op.cc) and [`tf.raw_ops.FractionalAvgPool`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/fr
ghsaosv
CVE-2022-41894HIGH≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41894 [HIGH] CWE-120 Buffer overflow in `CONV_3D_TRANSPOSE` on TFLite
Buffer overflow in `CONV_3D_TRANSPOSE` on TFLite
### Impact
The reference kernel of the [`CONV_3D_TRANSPOSE`](https://github.com/tensorflow/tensorflow/blob/091e63f0ea33def7ecad661a5ac01dcafbafa90b/tensorflow/lite/kernels/internal/reference/conv3d_transpose.h#L121) TensorFlow Lite operator wrongly increments the data_ptr when adding the bias to the result.
Instead of `data_ptr += num_channels;` it should be `data_ptr
ghsaosv
CVE-2022-35991HIGHCVSS 7.5≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-35991 [HIGH] `CHECK` fail in `TensorListScatter` and `TensorListScatterV2` in eager mode
`CHECK` fail in `TensorListScatter` and `TensorListScatterV2` in eager mode
### Impact
Another instance of CVE-2022-35991, where `TensorListScatter` and `TensorListScatterV2` crash via non scalar inputs in`element_shape`, was found in eager mode and fixed.
```python
import tensorflow as tf
arg_0=tf.random.uniform(shape=(2, 2, 2), dtype=tf.float16, maxval=None)
arg_1=tf.random.uniform(shape=(2, 2, 2
ghsaosv
CVE-2022-41902HIGH≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41902 [HIGH] CWE-125 Out of bounds write in grappler in Tensorflow
Out of bounds write in grappler in Tensorflow
### Impact
The function [MakeGrapplerFunctionItem](https://https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/grappler/utils/functions.cc#L221) takes arguments that determine the sizes of inputs and outputs. If the inputs given are greater than or equal to the sizes of the outputs, an out-of-bounds memory read or a crash is triggered.
### Patches
We have p
ghsaosv
CVE-2022-41908MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41908 [MEDIUM] CWE-20 `CHECK` fail via inputs in `PyFunc`
`CHECK` fail via inputs in `PyFunc`
### Impact
An input `token` that is not a UTF-8 bytestring will trigger a `CHECK` fail in [`tf.raw_ops.PyFunc`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/lib/core/py_func.cc).
```python
import tensorflow as tf
value = tf.constant(value=[1,2])
token = b'\xb0'
dataType = [tf.int32]
tf.raw_ops.PyFunc(input=value,token=token,Tout=dataType)
```
### Patches
We have p
ghsaosv
CVE-2022-41910MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41910 [MEDIUM] CWE-125 Heap overflow in `QuantizeAndDequantizeV2`
Heap overflow in `QuantizeAndDequantizeV2`
### Impact
The function [MakeGrapplerFunctionItem](https://https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/grappler/utils/functions.cc#L221) takes arguments that determine the sizes of inputs and outputs. If the inputs given are greater than or equal to the sizes of the outputs, an out-of-bounds memory read or a crash is triggered.
```python
import tensorflo
ghsaosv
CVE-2022-41888MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41888 [MEDIUM] CWE-20 FPE in `tf.image.generate_bounding_box_proposals`
FPE in `tf.image.generate_bounding_box_proposals`
### Impact
When running on GPU, [`tf.image.generate_bounding_box_proposals`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/image/generate_box_proposals_op.cu.cc) receives a `scores` input that must be of rank 4 but is not checked.
```python
import tensorflow as tf
a = tf.constant(value=[[1.0, 1.0], [1.0, 1.0], [1.0, 1.0], [1.0, 1.0]])
ghsaosv
CVE-2022-41886MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41886 [MEDIUM] CWE-131 Overflow in `ImageProjectiveTransformV2`
Overflow in `ImageProjectiveTransformV2`
### Impact
When [`tf.raw_ops.ImageProjectiveTransformV2`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/image/image_ops.cc) is given a large output shape, it overflows.
```python
import tensorflow as tf
interpolation = "BILINEAR"
fill_mode = "REFLECT"
images = tf.constant(0.184634328, shape=[2,5,8,3], dtype=tf.float32)
transforms = tf.constant(0.37857
ghsaosv
CVE-2022-41895MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41895 [MEDIUM] CWE-125 `MirrorPadGrad` heap out of bounds read
`MirrorPadGrad` heap out of bounds read
### Impact
If [`MirrorPadGrad`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/image/mirror_pad_op.cc) is given outsize input `paddings`, TensorFlow will give a heap OOB error.
```python
import tensorflow as tf
tf.raw_ops.MirrorPadGrad(input=[1],
paddings=[[0x77f00000,0xa000000]],
mode = 'REFLECT')
```
### Patches
We have patched the issue in GitHub com
ghsaosv
CVE-2022-41899MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41899 [MEDIUM] CWE-20 `CHECK` fail via inputs in `SdcaOptimizer`
`CHECK` fail via inputs in `SdcaOptimizer`
### Impact
Inputs `dense_features` or `example_state_data` not of rank 2 will trigger a `CHECK` fail in [`SdcaOptimizer`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/sdca_internal.cc).
```python
import tensorflow as tf
tf.raw_ops.SdcaOptimizer(
sparse_example_indices=4 * [tf.random.uniform([5,5,5,3], dtype=tf.dtypes.int64, maxval=100)],
sparse_f
ghsaosv
CVE-2022-41883MEDIUM≥ 2.10.0, < 2.10.12022-11-21
CVE-2022-41883 [MEDIUM] CWE-125 Out of bounds segmentation fault due to unequal op inputs in Tensorflow
Out of bounds segmentation fault due to unequal op inputs in Tensorflow
### Impact
[`tf.raw_ops.DynamicStitch`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/dynamic_stitch_op.cc) specifies input sizes when it is [registered](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ops/data_flow_ops.cc).
```cpp
REGISTER_OP("DynamicStitch")
.Input("in
ghsaosv
CVE-2022-41907MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41907 [MEDIUM] CWE-131 Overflow in `ResizeNearestNeighborGrad`
Overflow in `ResizeNearestNeighborGrad`
### Impact
When [`tf.raw_ops.ResizeNearestNeighborGrad`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/image/resize_nearest_neighbor_op.cc) is given a large `size` input, it overflows.
```
import tensorflow as tf
align_corners = True
half_pixel_centers = False
grads = tf.constant(1, shape=[1,8,16,3], dtype=tf.float16)
size = tf.constant([1879048192,1879
ghsaosv
CVE-2022-41884MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41884 [MEDIUM] CWE-670 Seg fault in `ndarray_tensor_bridge` due to zero and large inputs
Seg fault in `ndarray_tensor_bridge` due to zero and large inputs
### Impact
If a numpy array is created with a shape such that one element is zero and the others sum to a large number, an error will be raised. E.g. the following raises an error:
```python
np.ones((0, 2**31, 2**31))
```
An example of a proof of concept:
```python
import numpy as np
import tensorflow as tf
input_val = tf.constant([
ghsaosv
CVE-2022-41885MEDIUM≥ 0, < 2.7.4≥ 2.8.0, < 2.8.1+1 more2022-11-21
CVE-2022-41885 [MEDIUM] CWE-131 Overflow in `FusedResizeAndPadConv2D`
Overflow in `FusedResizeAndPadConv2D`
### Impact
When [`tf.raw_ops.FusedResizeAndPadConv2D`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/conv_ops_fused_image_transform.cc) is given a large tensor shape, it overflows.
```python
import tensorflow as tf
mode = "REFLECT"
strides = [1, 1, 1, 1]
padding = "SAME"
resize_align_corners = False
input = tf.constant(147, shape=[3,3,1,1], dtype=tf.float16
ghsaosv
CVE-2022-41898MEDIUM≥ 0, < 2.8.4≥ 2.9.0, < 2.9.3+1 more2022-11-21
CVE-2022-41898 [MEDIUM] CWE-20 `CHECK` fail via inputs in `SparseFillEmptyRowsGrad`
`CHECK` fail via inputs in `SparseFillEmptyRowsGrad`
### Impact
If [`SparseFillEmptyRowsGrad`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/sparse_fill_empty_rows_op_gpu.cu.cc) is given empty inputs, TensorFlow will crash.
```python
import tensorflow as tf
tf.raw_ops.SparseFillEmptyRowsGrad(
reverse_index_map=[], grad_values=[], name=None
)
```
### Patches
We have patched the is
ghsaosv