485 matches found
Null pointer dereference in `MatrixDiagPartOp`
Impact If a user does not provide a valid padding value to tf.rawops.MatrixDiagPartOp, then the code triggers a null pointer dereference if input is empty or produces invalid behavior, ignoring all values after the first: python import tensorflow as tf tf.rawops.MatrixDiagPartV2...
GHSA-HPV4-7P9C-MVFR Heap buffer overflow in `FractionalAvgPoolGrad`
Impact The implementation for tf.rawops.FractionalAvgPoolGrad can be tricked into accessing data outside of bounds of heap allocated buffers: python import tensorflow as tf tf.rawops.FractionalAvgPoolGrad originputtensorshape=0,1,2,3, outbackprop = np.array541,541,541,541, rowpoolingsequence=0, 0...
Heap OOB in `ResourceScatterUpdate`
Impact An attacker can trigger a read from outside of bounds of heap allocated data by sending invalid arguments to tf.rawops.ResourceScatterUpdate: python import tensorflow as tf v = tf.Variableb'vvv' tf.rawops.ResourceScatterUpdate resource=v.handle, indices=0, updates='1', '2', '3', '4', '5' T...
Crash caused by integer conversion to unsigned
Impact An attacker can cause a denial of service in boostedtreescreatequantilestreamresource by using negative arguments: python import tensorflow as tf from tensorflow.python.ops import genboostedtreesops import numpy as np v= tf.Variable0.0, 0.0, 0.0, 0.0, 0.0...
Reference binding to nullptr in `RaggedTensorToVariant`
Impact An attacker can cause undefined behavior via binding a reference to null pointer in tf.rawops.RaggedTensorToVariant: python import tensorflow as tf tf.rawops.RaggedTensorToVariant rtnestedsplits=, rtdensevalues=1,2,3, batchedinput=True The implementation has an incomplete validation of the...
GHSA-W4XF-2PQW-5MQ7 Reference binding to nullptr in `RaggedTensorToVariant`
Impact An attacker can cause undefined behavior via binding a reference to null pointer in tf.rawops.RaggedTensorToVariant: python import tensorflow as tf tf.rawops.RaggedTensorToVariant rtnestedsplits=, rtdensevalues=1,2,3, batchedinput=True The implementation has an incomplete validation of the...
Reference binding to nullptr in unicode encoding
Impact An attacker can cause undefined behavior via binding a reference to null pointer in tf.rawops.UnicodeEncode: python import tensorflow as tf from tensorflow.python.ops import genstringops genstringops.unicodeencode inputvalues=, inputsplits=, outputencoding='UTF-8', errors='ignore',...
FPE in `tf.raw_ops.UnravelIndex`
Impact An attacker can cause denial of service in applications serving models using tf.rawops.UnravelIndex by triggering a division by 0: python import tensorflow as tf tf.rawops.UnravelIndexindices=-1, dims=1,0,2 The implementation does not check that the tensor subsumed by dims is not empty...
Heap OOB in `UpperBound` and `LowerBound`
Impact An attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to tf.rawops.UpperBound: python import tensorflow as tf tf.rawops.UpperBound sortedinput=1,2,3, values=tf.constantvalue=0,0,0,1,1,1,2,2,2,dtype=tf.int64, outtype=tf.int64 The...
Heap OOB in `SdcaOptimizerV2`
Impact An attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to tf.rawops.SdcaOptimizerV2: python import tensorflow as tf tf.rawops.SdcaOptimizerV2 sparseexampleindices=1, sparsefeatureindices=1, sparsefeaturevalues=1.0,2.0,...
Division by 0 in most convolution operators
Impact Most implementations of convolution operators in TensorFlow are affected by a division by 0 vulnerability where an attacker can trigger a denial of service via a crash: python import tensorflow as tf tf.compat.v1.disablev2behavior tf.rawops.Conv2D input = tf.constant, shape=0, 0, 0, 0,...
Missing validation in shape inference for `Dequantize`
Impact The shape inference code for tf.rawops.Dequantize has a vulnerability that could trigger a denial of service via a segfault if an attacker provides invalid arguments: python import tensorflow as tf tf.compat.v1.disablev2behavior tf.rawops.Dequantize inputtensor = tf.constant-10.0,...
Arbitrary code execution due to YAML deserialization
Impact TensorFlow and Keras can be tricked to perform arbitrary code execution when deserializing a Keras model from YAML format. python from tensorflow.keras import models payload = ''' !!python/object/new:type args: 'z', !!python/tuple , 'extend': !!python/name:exec listitems:...
Heap OOB in nested `tf.map_fn` with `RaggedTensor`s
Impact It is possible to nest a tf.mapfn within another tf.mapfn call. However, if the input tensor is a RaggedTensor and there is no function signature provided, code assumes the output is a fully specified tensor and fills output buffer with uninitialized contents from the heap: python import...
NPE in TFLite
Impact The implementation of SVDF in TFLite is vulnerable to a null pointer error: cc TfLiteTensor state = GetVariableInputcontext, node, kStateTensor; // ... GetTensorDatastate The GetVariableInput function can return a null pointer but GetTensorData assumes that the argument is always a valid...
FPE in TFLite pooling operations
Impact The implementations of pooling in TFLite are vulnerable to division by 0 errors as there are no checks for divisors not being 0. Patches We have patched the issue in GitHub commit dfa22b348b70bb89d6d6ec0ff53973bacb4f4695. The fix will be included in TensorFlow 2.6.0. We will also cherrypic...
Heap OOB in TFLite
Impact TFLite's expanddims.cc contains a vulnerability which allows reading one element outside of bounds of heap allocated data: cc if axis size; ++i if i datai = inputdims.datai; else if i == axis outputdims-datai = 1; else outputdims-datai = inputdims.datai - 1; If axis is a large negative val...
Heap OOB in TFLite's `Gather*` implementations
Impact TFLite's GatherNd implementation does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in indices. Similar issue exists in Gather implementation. python impor...
Null pointer dereference in TFLite
Impact An attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service: python import tensorflow as tf model = tf.keras.models.Sequential model.addtf.keras.Inputshape=1, 2, 3 model.addtf.keras.layers.Dense0, activation='relu'...
Null pointer dereference in TFLite MLIR optimizations
Impact An attacker can craft a TFLite model that would trigger a null pointer dereference, which would result in a crash and denial of service: This is caused by the MLIR optimization of L2NormalizeReduceAxis operator. The implementation unconditionally dereferences a pointer to an iterator to a...