Lucene search

K
githubGitHub Advisory DatabaseGHSA-GWCX-JRX4-92W2
HistoryFeb 09, 2022 - 11:32 p.m.

Segfault in `simplifyBroadcast` in Tensorflow

2022-02-0923:32:08
CWE-754
GitHub Advisory Database
github.com
18
tensorflow
segfault
denial of service
patched
vulnerability
mlir-tfrt
scalar shapes
github commit

CVSS2

5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

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

CVSS3

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

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

EPSS

0.002

Percentile

57.4%

Impact

The simplifyBroadcast function in the MLIR-TFRT infrastructure in TensorFlow is vulnerable to a segfault (hence, denial of service), if called with scalar shapes.

  size_t maxRank = 0;
  for (auto shape : llvm::enumerate(shapes)) {
    auto found_shape = analysis.dimensionsForShapeTensor(shape.value());
    if (!found_shape) return {};
    shapes_found.push_back(*found_shape);
    maxRank = std::max(maxRank, found_shape->size());
  }   

  SmallVector<const ShapeComponentAnalysis::SymbolicDimension*>
      joined_dimensions(maxRank);

If all shapes are scalar, then maxRank is 0, so we build an empty SmallVector.

Patches

We have patched the issue in GitHub commit 35f0fabb4c178253a964d7aabdbb15c6a398b69a.

The fix will be included in TensorFlow 2.8.0. This is the only affected version.

For more information

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

Affected configurations

Vulners
Node
tensorflow-gpuMatch2.8.0-rc0
OR
tensorflow-cpuMatch2.8.0-rc0
OR
tensorflowtensorflowMatch2.8.0-rc0
VendorProductVersionCPE
*tensorflow-gpu2.8.0-rc0cpe:2.3:a:*:tensorflow-gpu:2.8.0-rc0:*:*:*:*:*:*:*
*tensorflow-cpu2.8.0-rc0cpe:2.3:a:*:tensorflow-cpu:2.8.0-rc0:*:*:*:*:*:*:*
tensorflowtensorflow2.8.0-rc0cpe:2.3:a:tensorflow:tensorflow:2.8.0-rc0:*:*:*:*:*:*:*

CVSS2

5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

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

CVSS3

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

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

EPSS

0.002

Percentile

57.4%

Related for GHSA-GWCX-JRX4-92W2