GHSA-44qp-9wwf-734r
Vulnerability from github
7.2 (High) - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
Impact
The implementation of SparseCountSparseOutput
is vulnerable to a heap overflow:
```python import tensorflow as tf import numpy as np
tf.raw_ops.SparseCountSparseOutput( indices=[[-1,-1]], values=[2], dense_shape=[1, 1], weights=[1], binary_output=True, minlength=-1, maxlength=-1, name=None) ```
Patches
We have patched the issue in GitHub commits 2b7100d6cdff36aa21010a82269bc05a6d1cc74a and adbbabdb0d3abb3cdeac69e38a96de1d678b24b3.
The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, 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 Faysal Hossain Shezan from University of Virginia.
{ "affected": [ { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.5.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "events": [ { "introduced": "2.6.0" }, { "fixed": "2.6.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow" }, "ranges": [ { "events": [ { "introduced": "2.7.0" }, { "fixed": "2.7.1" } ], "type": "ECOSYSTEM" } ], "versions": [ "2.7.0" ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.5.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "events": [ { "introduced": "2.6.0" }, { "fixed": "2.6.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-cpu" }, "ranges": [ { "events": [ { "introduced": "2.7.0" }, { "fixed": "2.7.1" } ], "type": "ECOSYSTEM" } ], "versions": [ "2.7.0" ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.5.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "events": [ { "introduced": "2.6.0" }, { "fixed": "2.6.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "tensorflow-gpu" }, "ranges": [ { "events": [ { "introduced": "2.7.0" }, { "fixed": "2.7.1" } ], "type": "ECOSYSTEM" } ], "versions": [ "2.7.0" ] } ], "aliases": [ "CVE-2022-21740" ], "database_specific": { "cwe_ids": [ "CWE-120", "CWE-787" ], "github_reviewed": true, "github_reviewed_at": "2022-02-03T20:13:28Z", "nvd_published_at": "2022-02-03T15:15:00Z", "severity": "HIGH" }, "details": "### Impact \nThe [implementation of `SparseCountSparseOutput`](https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/count_ops.cc#L168-L273) is vulnerable to a heap overflow:\n\n```python\nimport tensorflow as tf\nimport numpy as np\n\ntf.raw_ops.SparseCountSparseOutput(\n indices=[[-1,-1]],\n values=[2],\n dense_shape=[1, 1],\n weights=[1],\n binary_output=True,\n minlength=-1,\n maxlength=-1,\n name=None)\n```\n\n### Patches\nWe have patched the issue in GitHub commits [2b7100d6cdff36aa21010a82269bc05a6d1cc74a](https://github.com/tensorflow/tensorflow/commit/2b7100d6cdff36aa21010a82269bc05a6d1cc74a) and [adbbabdb0d3abb3cdeac69e38a96de1d678b24b3](https://github.com/tensorflow/tensorflow/commit/adbbabdb0d3abb3cdeac69e38a96de1d678b24b3).\n\nThe fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.\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\n### Attribution\nThis vulnerability has been reported by Faysal Hossain Shezan from University of Virginia.", "id": "GHSA-44qp-9wwf-734r", "modified": "2024-11-13T22:33:49Z", "published": "2022-02-09T23:47:14Z", "references": [ { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-44qp-9wwf-734r" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21740" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/commit/2b7100d6cdff36aa21010a82269bc05a6d1cc74a" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/commit/adbbabdb0d3abb3cdeac69e38a96de1d678b24b3" }, { "type": "WEB", "url": "https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2022-64.yaml" }, { "type": "WEB", "url": "https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2022-119.yaml" }, { "type": "PACKAGE", "url": "https://github.com/tensorflow/tensorflow" }, { "type": "WEB", "url": "https://github.com/tensorflow/tensorflow/blob/5100e359aef5c8021f2e71c7b986420b85ce7b3d/tensorflow/core/kernels/count_ops.cc#L168-L273" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H", "type": "CVSS_V3" }, { "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N", "type": "CVSS_V4" } ], "summary": "Heap overflow in Tensorflow" }
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.