ghsa-rh87-q4vg-m45j
Vulnerability from github
Impact
When RangeSize
receives values that do not fit into an int64_t
, it crashes.
```cpp
auto size = (std::is_integral
// This check does not cover all cases.
if (size > std::numeric_limits
c->set_output(0, c->Vector(static_cast
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.
{ "affected": [ { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.7.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "events": [ { "introduced": "2.8.0" }, { "fixed": "2.8.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "events": [ { "introduced": "2.9.0" }, { "fixed": "2.9.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.7.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "events": [ { "introduced": "2.8.0" }, { "fixed": "2.8.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "events": [ { "introduced": "2.9.0" }, { "fixed": "2.9.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.7.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "events": [ { "introduced": "2.8.0" }, { "fixed": "2.8.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "events": [ { "introduced": "2.9.0" }, { "fixed": "2.9.1" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-36015" ], "database_specific": { "cwe_ids": [ "CWE-190" ], "github_reviewed": true, "github_reviewed_at": "2022-09-16T21:20:28Z", "nvd_published_at": "2022-09-16T23:15:00Z", "severity": "LOW" }, "details": "### Impact\nWhen [`RangeSize`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ops/math_ops.cc) receives values that do not fit into an `int64_t`, it crashes.\n```cpp\n auto size = (std::is_integral\u003cT\u003e::value\n ? ((Eigen::numext::abs(limit - start) +\n Eigen::numext::abs(delta) - T(1)) /\n Eigen::numext::abs(delta))\n : (Eigen::numext::ceil(\n Eigen::numext::abs((limit - start) / delta))));\n\n // This check does not cover all cases.\n if (size \u003e std::numeric_limits\u003cint64_t\u003e::max()) {\n return errors::InvalidArgument(\"Requires ((limit - start) / delta) \u003c= \",\n std::numeric_limits\u003cint64_t\u003e::max());\n }\n\n c-\u003eset_output(0, c-\u003eVector(static_cast\u003cint64_t\u003e(size)));\n return Status::OK();\n}\n```\n\n### Patches\nWe have patched the issue in GitHub commit [37e64539cd29fcfb814c4451152a60f5d107b0f0](https://github.com/tensorflow/tensorflow/commit/37e64539cd29fcfb814c4451152a60f5d107b0f0).\nThe 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.\n\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n", "id": "GHSA-rh87-q4vg-m45j", "modified": "2022-09-16T21:20:28Z", "published": "2022-09-16T21:20:28Z", "references": [ { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-rh87-q4vg-m45j" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-36015" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/commit/37e64539cd29fcfb814c4451152a60f5d107b0f0" }, { "type": "PACKAGE", "url": "https://github.com/tensorflow/tensorflow" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ops/math_ops.cc" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/releases/tag/v2.10.0" } ], "schema_version": "1.4.0", "severity": [], "summary": "TensorFlow vulnerable to integer overflow in math ops" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.