Integer Overflow or Wraparound 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.09% (42nd 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 IDSNYK-PYTHON-TENSORFLOWGPU-3026845
  • published18 Sept 2022
  • disclosed16 Sept 2022
  • creditJingyi Shi

Introduced: 16 Sep 2022

CVE-2022-35940  (opens in a new tab)
CWE-190  (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 Integer Overflow or Wraparound. The RaggedRangOp function takes an argument limits that is eventually used to construct a TensorShape as an int64. If limits is a very large float, it can overflow when converted to an int64. This triggers an InvalidArgument but also throws an abort signal that crashes the program.

PoC

import tensorflow as tf
tf.raw_ops.RaggedRange(starts=[1.1,0.1],limits=[10.0,1e20],deltas=[1,1])

CVSS Scores

version 3.1