GitHub Advisoryadvisory · PyPI

GHSA-rh87-q4vg-m45j TensorFlow vulnerable to integer overflow in math ops

LOW Published 2022-09-16 Modified 2022-09-16 Official page ↗
Aliases
CVE-2022-36015
Ecosystem
PyPI
Packages
tensorflow, tensorflow-cpu, tensorflow-gpu
Severity
Low
Weaknesses
CWE-190
Reviewed
2022-09-16

Affected packages

• PyPI tensorflow: < 2.7.2 → fixed in 2.7.2 • PyPI tensorflow: >= 2.8.0, < 2.8.1 → fixed in 2.8.1 • PyPI tensorflow: >= 2.9.0, < 2.9.1 → fixed in 2.9.1 • PyPI tensorflow-cpu: < 2.7.2 → fixed in 2.7.2 • PyPI tensorflow-cpu: >= 2.8.0, < 2.8.1 → fixed in 2.8.1 • PyPI tensorflow-cpu: >= 2.9.0, < 2.9.1 → fixed in 2.9.1 • PyPI tensorflow-gpu: < 2.7.2 → fixed in 2.7.2 • PyPI tensorflow-gpu: >= 2.8.0, < 2.8.1 → fixed in 2.8.1 • PyPI tensorflow-gpu: >= 2.9.0, < 2.9.1 → fixed in 2.9.1

Description

Impact When `RangeSize` receives values that do not fit into an `int64_t`, it crashes. ```cpp auto size = (std::is_integral::value ? ((Eigen::numext::abs(limit - start) + Eigen::numext::abs(delta) - T(1)) / Eigen::numext::abs(delta)) : (Eigen::numext::ceil( Eigen::numext::abs((limit - start) / delta)))); // This check does not cover all cases. if (size > std::numeric_limits::max()) { return errors::InvalidArgument("Requires ((limit - start) / delta) ::max()); } c->set_output(0, c->Vector(static_cast(size))); return Status::OK(); } ``` Patches We have patched the issue in GitHub commit 37e64539cd29fcfb814c4451152a60f5d107b0f0. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, 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.

Related

Alias · CVE (1)

  • CVE-2022-36015 TensorFlow is an open source platform for machine learning. vulnerability

Weakness · CWE (1)

  • CWE-190 Integer Overflow or Wraparound weakness

References