Out-of-bounds Read Affecting tensorflow-gpu package, versions [2.5.0,2.5.1) [2.4.0,2.4.3) [,2.3.4)


0.0
high

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High

    Threat Intelligence

    EPSS 0.04% (11th percentile)
Expand this section
NVD
7.8 high

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-1540725
  • published 13 Aug 2021
  • disclosed 13 Aug 2021
  • credit Unknown

How to fix?

Upgrade tensorflow-gpu to version 2.5.1, 2.4.3, 2.3.4 or higher.

Overview

tensorflow-gpu is a machine learning framework.

Affected versions of this package are vulnerable to Out-of-bounds Read. It is possible to nest a tf.map_fn within another tf.map_fn call. However, if the input tensor is a RaggedTensor and there is no function signature provided, code assumes the output is a fully specified tensor and fills output buffer with uninitialized contents from the heap. The t and z outputs should be identical, however this is not the case. The last row of t contains data from the heap which can be used to leak other memory information. The bug lies in the conversion from a Variant tensor to a RaggedTensor. The implementation does not check that all inner shapes match and this results in the additional dimensions. The same implementation can result in data loss, if input tensor is tweaked.

References