Lucene search

K
githubGitHub Advisory DatabaseGHSA-PMPR-55FJ-R229
HistoryMay 21, 2021 - 2:27 p.m.

Division by zero in TFLite's implementation of `SVDF`

2021-05-2114:27:58
CWE-369
GitHub Advisory Database
github.com
25
tflite
svdf
division by zero
vulnerability
patch
tensorflow 2.5.0
github
security guide
aivul team
qihoo 360

CVSS2

4.6

Attack Vector

LOCAL

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

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

CVSS3

7.8

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

EPSS

0.001

Percentile

17.8%

Impact

The implementation of the SVDF TFLite operator is vulnerable to a division by zero error:

const int rank = params->rank;
...
TF_LITE_ENSURE_EQ(context, num_filters % rank, 0);

An attacker can craft a model such that params->rank would be 0.

Patches

We have patched the issue in GitHub commit 6841e522a3e7d48706a02e8819836e809f738682.

The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

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 members of the Aivul Team from Qihoo 360.

Affected configurations

Vulners
Node
tensorflow-gpuRange2.4.02.4.2
OR
tensorflow-gpuRange2.3.02.3.3
OR
tensorflow-gpuRange2.2.02.2.3
OR
tensorflow-gpuRange<2.1.4
OR
tensorflow-cpuRange2.4.02.4.2
OR
tensorflow-cpuRange2.3.02.3.3
OR
tensorflow-cpuRange2.2.02.2.3
OR
tensorflow-cpuRange<2.1.4
OR
tensorflowtensorflowRange2.4.02.4.2
OR
tensorflowtensorflowRange2.3.02.3.3
OR
tensorflowtensorflowRange2.2.02.2.3
OR
tensorflowtensorflowRange<2.1.4
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

4.6

Attack Vector

LOCAL

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

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

CVSS3

7.8

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

EPSS

0.001

Percentile

17.8%

Related for GHSA-PMPR-55FJ-R229