VYPR
Moderate severityNVD Advisory· Published Feb 4, 2022· Updated Apr 22, 2025

Null pointer dereference in TensorFlow

CVE-2022-23595

Description

Tensorflow is an Open Source Machine Learning Framework. When building an XLA compilation cache, if default settings are used, TensorFlow triggers a null pointer dereference. In the default scenario, all devices are allowed, so flr->config_proto is nullptr. 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 packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.5.32.5.3
tensorflowPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflowPyPI
>= 2.7.0, < 2.7.12.7.1
tensorflow-cpuPyPI
< 2.5.32.5.3
tensorflow-cpuPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflow-cpuPyPI
>= 2.7.0, < 2.7.12.7.1
tensorflow-gpuPyPI
< 2.5.32.5.3
tensorflow-gpuPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflow-gpuPyPI
>= 2.7.0, < 2.7.12.7.1

Affected products

1

Patches

1
e21af685e182

Fix Null-pointer dereference in BuildXlaCompilationCache

https://github.com/tensorflow/tensorflowSmit HinsuJan 8, 2022via ghsa
1 file changed · +7 5
  • tensorflow/compiler/jit/xla_platform_info.cc+7 5 modified
    @@ -82,11 +82,13 @@ Status BuildXlaCompilationCache(DeviceBase* device, FunctionLibraryRuntime* flr,
       client_options.set_intra_op_parallelism_threads(
           device->tensorflow_cpu_worker_threads()->num_threads);
     
    -  string allowed_gpus =
    -      flr->config_proto()->gpu_options().visible_device_list();
    -  TF_ASSIGN_OR_RETURN(absl::optional<std::set<int>> gpu_ids,
    -                      ParseVisibleDeviceList(allowed_gpus));
    -  client_options.set_allowed_devices(gpu_ids);
    +  if (flr->config_proto()) {
    +    string allowed_gpus =
    +        flr->config_proto()->gpu_options().visible_device_list();
    +    TF_ASSIGN_OR_RETURN(absl::optional<std::set<int>> gpu_ids,
    +                        ParseVisibleDeviceList(allowed_gpus));
    +    client_options.set_allowed_devices(gpu_ids);
    +  }
     
       auto client = xla::ClientLibrary::GetOrCreateLocalClient(client_options);
       if (!client.ok()) {
    

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.