VYPR
High severityNVD Advisory· Published Aug 12, 2021· Updated Aug 4, 2024

Null pointer dereference in `RaggedTensorToTensor` in TensorFlow

CVE-2021-37638

Description

TensorFlow is an end-to-end open source platform for machine learning. Sending invalid argument for row_partition_types of tf.raw_ops.RaggedTensorToTensor API results in a null pointer dereference and undefined behavior. The implementation accesses the first element of a user supplied list of values without validating that the provided list is not empty. We have patched the issue in GitHub commit 301ae88b331d37a2a16159b65b255f4f9eb39314. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.3.42.3.4
tensorflowPyPI
>= 2.4.0, < 2.4.32.4.3
tensorflowPyPI
>= 2.5.0, < 2.5.12.5.1
tensorflow-cpuPyPI
< 2.3.42.3.4
tensorflow-cpuPyPI
>= 2.4.0, < 2.4.32.4.3
tensorflow-cpuPyPI
>= 2.5.0, < 2.5.12.5.1
tensorflow-gpuPyPI
< 2.3.42.3.4
tensorflow-gpuPyPI
>= 2.4.0, < 2.4.32.4.3
tensorflow-gpuPyPI
>= 2.5.0, < 2.5.12.5.1

Affected products

1

Patches

1
301ae88b331d

Fix null ptr deref in tf.raw_ops.RaggedTensorToTensor

https://github.com/tensorflow/tensorflowLaura PakJul 12, 2021via ghsa
1 file changed · +3 0
  • tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc+3 0 modified
    @@ -348,6 +348,9 @@ class RaggedTensorToTensorBaseOp : public OpKernel {
       Status GetFirstDimensionSize(OpKernelContext* context, INDEX_TYPE* result) {
         const Tensor first_partition_tensor =
             context->input(kFirstPartitionInputIndex);
    +    if (row_partition_types_.empty()) {
    +      return errors::InvalidArgument("No row_partition_types given.");
    +    }
         const RowPartitionType first_partition_type = row_partition_types_[0];
         switch (first_partition_type) {
           case RowPartitionType::FIRST_DIM_SIZE:
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.