Browse / AI Framework and Platform Flaws / Memory corruption
Memory corruption
159 records in AI Framework and Platform Flaws.
- Out of bounds write in Tensorflow Grappler shape inference calls set_output with an unchecked index, allowing a heap out-of-bounds write from a crafted graph.
- Out of bounds read in Tensorflow Shape inference for ReverseSequence fails to reject overly negative batch_dim values, causing a heap out-of-bounds read.
- Out of bounds read and write in Tensorflow A loop index typo indexes into a protobuf argument list out of range, enabling reads and writes past the end of the heap buffer.
- Out of bounds write in TFLite A crafted TFLite model makes the runtime write past an array bound, corrupting the memory allocator's linked list and enabling arbitrary writes.
- Null-dereference in Tensorflow A protobuf tensor missing a required attribute triggers a null pointer dereference because the only check is a debug-only assertion.
- NULL Pointer Dereference and Access of Uninitialized Pointer in TensorFlow Missing validation in boosted trees stats ops allows out-of-bounds heap reads and writes, null pointer dereferences and CHECK failures.
- Integer overflow in Tensorflow An integer overflow in the Range op's size computation causes undefined behaviour or oversized allocations when the caller controls the range arguments.
- Out of bounds read in Tensorflow Invalid inputs to the fractional average pooling gradient op are not checked, causing reads past the end of a heap buffer.
- Out of bounds read in Tensorflow Graph type inference checks an input index only with a debug-mode assertion, so a crafted graph can index past a heap array in release builds.
- Heap OOB in `SparseBinCount` Sparse bin-count does not check that values fit the output shape, so an out-of-range bin index writes past a heap buffer.
- Heap buffer overflow in `Transpose` Shape inference for Transpose does not validate negative permutation indices, so an out-of-range index causes a heap buffer overflow.
- Heap OOB read in all `tf.raw_ops.QuantizeAndDequantizeV*` ops Shape inference for the QuantizeAndDequantizeV* ops reads heap memory beyond an array when given a negative axis value.
- Undefined behavior via `nullptr` reference binding in sparse matrix multiplication Zero-dimension inputs to SparseMatMul bind a reference to null, causing undefined behaviour and heap out-of-bounds writes.
- Incomplete validation in boosted trees code Missing input validation in boosted trees stats kernels lets crafted arguments cause null dereferences, assertion failures, and out-of-bounds heap reads and writes.
- A use of uninitialized value vulnerability in Tensorflow A saved model without a dequeue node makes TensorFlow's Grappler optimizer read a variable that was never initialised.
- Access to invalid memory during shape inference in `Cudnn*` ops Shape inference for Cudnn RNN ops reads dimensions from inputs of unchecked rank, causing out-of-bounds heap memory access.
- Heap OOB in shape inference for `QuantizeV2` Shape inference for QuantizeV2 uses a negative axis below -1 as an index into input dimensions without bounds checking, reading memory before a heap buffer.
- Heap OOB in `FusedBatchNorm` kernels Malformed tensor shapes passed to the FusedBatchNormGrad kernel cause a heap out-of-bounds access.
- Heap OOB read in `tf.ragged.cross` Shape inference for the ragged cross op reads past a heap buffer when given crafted sparse inputs.
- Use after free / memory leak in `CollectiveReduceV2` An async error path in CollectiveReduceV2 uses a callback after it was moved from, causing use-after-free and memory leaks.
- Unitialized access in `EinsumHelper::ParseEquation` The einsum equation parser does not set ellipsis flags on every path, so callers read uninitialised variables.
- Heap OOB read in `tf.raw_ops.SparseCountSparseOutput` Shape inference for a sparse count op never checks the rank of its indices input, so a malformed tensor triggers an out-of-bounds heap read.
- Incomplete validation of shapes in multiple TF ops Several ops skip shape validation on tensor arguments, allowing crashes and out-of-bounds heap reads or writes.
- `SparseFillEmptyRows` heap OOB SparseFillEmptyRows does not check that indices and values have matching sizes, so mismatched inputs cause an out-of-bounds heap read.
- Heap OOB and CHECK fail in `ResourceGather` An excessive batch_dims value makes ResourceGather read past the tensor's heap buffer because its rank check is only a debug check.
- Use after free and segfault in shape inference functions Shape and type data attached to shape-inference output references memory owned by a context that is freed early, so later access causes a use-after-free and segfault.
- Use of unitialized value in TFLite Quantized TFLite operations read quantization parameters without checking the quantization type, so they can use uninitialized pointers.
- Reference binding to nullptr in `RaggedTensorToSparse` A ragged-tensor op accepts a splits array without checking ordering, binding a reference to null and causing undefined behaviour.
- Heap OOB in `SdcaOptimizerV2` Illegal tensor arguments to an SDCA optimizer op skip a length check, letting the kernel read past the end of a heap buffer.
- Reference binding to nullptr in `MatrixSetDiagV*` ops An empty tensor passed as the diagonal offset makes code read its first element through a null reference, causing undefined behaviour.
- Heap OOB in `ResourceScatterUpdate` A weak divisibility check on the shapes of indices and updates in ResourceScatterUpdate allows an out-of-bounds heap read.
- Heap OOB in `UpperBound` and `LowerBound` Crafted illegal arguments to UpperBound and LowerBound cause heap reads past the buffer because the rank of sorted_input is never validated.
- Heap OOB in `RaggedGather` Crafted ragged tensor arguments make RaggedGather read a tensor's first dimension before checking its rank, causing an out-of-bounds heap read.
- Integer overflow due to conversion to unsigned A negative axis value is converted to unsigned and used as an allocation size in QuantizeAndDequantizeV4Grad, causing integer overflow in memory handling.
- Heap OOB in TFLite The expand-dims kernel does not check the lower bound of a negative axis, so a large negative value causes a read one element before the array start.
- Heap out of bounds access in sparse reduction operations Sparse reduction operations do not check group sizes or index bounds, so crafted sparse tensors cause heap out-of-bounds reads.
- Reference binding to nullptr in boosted trees Malformed empty or mismatched tensor inputs to boosted-trees ops are not validated, so a reference is bound to null, causing undefined behaviour.
- Segfault and heap buffer overflow in `{Experimental,}DatasetToTFRecord` Dataset-to-TFRecord ops assume every record is a string without checking, so numeric records cause a heap overflow and crash.
- Incomplete validation in `QuantizeV2` Missing shape checks in the quantization op let mismatched range tensors cause out-of-bounds heap reads and null reference access.
- Null pointer dereference and heap OOB read in operations restoring tensors Restore ops given an empty or short tensor name list index past the end of a heap buffer or dereference a null pointer, causing out-of-bounds reads.
- Heap buffer overflow in `FractionalAvgPoolGrad` An empty input tensor is not validated in the fractional average pooling gradient, so the kernel reads and writes outside its allocated buffers.
- Heap OOB in TFLite's `Gather*` implementations Gather operations accept negative index values without checking, so a crafted model makes the interpreter read out-of-bounds heap memory.
- Use after free in boosted trees creation A resource freed after failed initialisation is freed again during cleanup because refcounting and smart-pointer handling disagree, causing a use after free.
- Reference binding to nullptr and heap OOB in binary cwise ops Binary elementwise gradient ops skip a size check on mismatched inputs, so a reference binds to null and reads past the heap buffer.
- Reference binding to nullptr in map operations An empty indices argument in map operations leaves a reference bound to null, causing undefined behaviour in the kernel.
- Heap OOB in boosted trees Out-of-range indices in the sparse best-split calculation cause heap out-of-bounds reads when the caller supplies crafted stats summary indices.
- Incomplete validation in MKL requantization Missing dimension validation in the MKL requantization kernels lets crafted inputs cause null reference binding and out-of-bounds heap access.
- Reference binding to nullptr in `RaggedTensorToVariant` Empty split arguments in a raw op call cause a null reference to be bound, producing undefined behaviour from crafted tensor inputs.
- Heap OOB read in TFLite's implementation of `Minimum` or `Maximum` TFLite Minimum and Maximum broadcasting indexes both inputs with the same index without bounds checks, so an empty input causes heap out-of-bounds reads.
- Heap buffer overflow in `QuantizedReshape` QuantizedReshape reads the first element of its threshold tensors without checking they are non-empty, so empty inputs cause a heap overflow.