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.
| Package | Affected versions | Patched versions |
|---|---|---|
tensorflowPyPI | < 2.5.3 | 2.5.3 |
tensorflowPyPI | >= 2.6.0, < 2.6.3 | 2.6.3 |
tensorflowPyPI | >= 2.7.0, < 2.7.1 | 2.7.1 |
tensorflow-cpuPyPI | < 2.5.3 | 2.5.3 |
tensorflow-cpuPyPI | >= 2.6.0, < 2.6.3 | 2.6.3 |
tensorflow-cpuPyPI | >= 2.7.0, < 2.7.1 | 2.7.1 |
tensorflow-gpuPyPI | < 2.5.3 | 2.5.3 |
tensorflow-gpuPyPI | >= 2.6.0, < 2.6.3 | 2.6.3 |
tensorflow-gpuPyPI | >= 2.7.0, < 2.7.1 | 2.7.1 |
Affected products
1- Range: >= 2.7.0, < 2.7.1
Patches
1e21af685e182Fix Null-pointer dereference in BuildXlaCompilationCache
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- github.com/advisories/GHSA-fpcp-9h7m-ffpxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-23595ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2022-103.yamlghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2022-158.yamlghsaWEB
- github.com/tensorflow/tensorflow/blob/274df9b02330b790aa8de1cee164b70f72b9b244/tensorflow/compiler/jit/xla_platform_info.ccghsax_refsource_MISCWEB
- github.com/tensorflow/tensorflow/commit/e21af685e1828f7ca65038307df5cc06de4479e8ghsax_refsource_MISCWEB
- github.com/tensorflow/tensorflow/security/advisories/GHSA-fpcp-9h7m-ffpxghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.