gsd-2021-29521
Vulnerability from gsd
Modified
2023-12-13 01:23
Details
TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L199-L213) assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap<T>` (i.e., `std::vector<absl::flat_hash_map<int64,T>>`(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L27)) data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape (that is, all elements are non-negative) solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3.
Aliases
Aliases
{ "GSD": { "alias": "CVE-2021-29521", "description": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L199-L213) assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` (i.e., `std::vector\u003cabsl::flat_hash_map\u003cint64,T\u003e\u003e`(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L27)) data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape (that is, all elements are non-negative) solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3.", "id": "GSD-2021-29521", "references": [ "https://www.suse.com/security/cve/CVE-2021-29521.html", "https://security.archlinux.org/CVE-2021-29521" ] }, "gsd": { "metadata": { "exploitCode": "unknown", "remediation": "unknown", "reportConfidence": "confirmed", "type": "vulnerability" }, "osvSchema": { "aliases": [ "CVE-2021-29521" ], "details": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L199-L213) assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` (i.e., `std::vector\u003cabsl::flat_hash_map\u003cint64,T\u003e\u003e`(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L27)) data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape (that is, all elements are non-negative) solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3.", "id": "GSD-2021-29521", "modified": "2023-12-13T01:23:36.776284Z", "schema_version": "1.4.0" } }, "namespaces": { "cve.org": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2021-29521", "STATE": "PUBLIC", "TITLE": "Segfault in SparseCountSparseOutput" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "tensorflow", "version": { "version_data": [ { "version_value": "\u003c 2.3.3" }, { "version_value": "\u003e= 2.4.0, \u003c 2.4.2" } ] } } ] }, "vendor_name": "tensorflow" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L199-L213) assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` (i.e., `std::vector\u003cabsl::flat_hash_map\u003cint64,T\u003e\u003e`(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L27)) data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape (that is, all elements are non-negative) solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3." } ] }, "impact": { "cvss": { "attackComplexity": "HIGH", "attackVector": "LOCAL", "availabilityImpact": "LOW", "baseScore": 2.5, "baseSeverity": "LOW", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L", "version": "3.1" } }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "CWE-131: Incorrect Calculation of Buffer Size" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hr84-fqvp-48mm", "refsource": "CONFIRM", "url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hr84-fqvp-48mm" }, { "name": "https://github.com/tensorflow/tensorflow/commit/c57c0b9f3a4f8684f3489dd9a9ec627ad8b599f5", "refsource": "MISC", "url": "https://github.com/tensorflow/tensorflow/commit/c57c0b9f3a4f8684f3489dd9a9ec627ad8b599f5" } ] }, "source": { "advisory": "GHSA-hr84-fqvp-48mm", "discovery": "UNKNOWN" } }, "gitlab.com": { "advisories": [ { "affected_range": "\u003e=2.3.0,\u003c2.3.3||\u003e=2.4.0,\u003c2.4.2", "affected_versions": "All versions starting from 2.3.0 before 2.3.3, all versions starting from 2.4.0 before 2.4.2", "cvss_v2": "AV:L/AC:L/Au:N/C:N/I:N/A:P", "cvss_v3": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "cwe_ids": [ "CWE-1035", "CWE-131", "CWE-937" ], "date": "2021-05-21", "description": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3.", "fixed_versions": [ "2.3.3", "2.4.2" ], "identifier": "CVE-2021-29521", "identifiers": [ "GHSA-hr84-fqvp-48mm", "CVE-2021-29521" ], "not_impacted": "All versions before 2.3.0, all versions starting from 2.3.3 before 2.4.0, all versions starting from 2.4.2", "package_slug": "pypi/tensorflow-cpu", "pubdate": "2021-05-21", "solution": "Upgrade to versions 2.3.3, 2.4.2 or above.", "title": "Incorrect Calculation of Buffer Size", "urls": [ "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hr84-fqvp-48mm", "https://nvd.nist.gov/vuln/detail/CVE-2021-29521", "https://github.com/tensorflow/tensorflow/commit/c57c0b9f3a4f8684f3489dd9a9ec627ad8b599f5", "https://github.com/advisories/GHSA-hr84-fqvp-48mm" ], "uuid": "0e2fb005-f421-4b8a-ab5b-8aaeeaa97170" }, { "affected_range": "\u003e=2.3.0,\u003c2.3.3||\u003e=2.4.0,\u003c2.4.2", "affected_versions": "All versions starting from 2.3.0 before 2.3.3, all versions starting from 2.4.0 before 2.4.2", "cvss_v2": "AV:L/AC:L/Au:N/C:N/I:N/A:P", "cvss_v3": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "cwe_ids": [ "CWE-1035", "CWE-131", "CWE-937" ], "date": "2021-05-21", "description": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3.", "fixed_versions": [ "2.3.3", "2.4.2" ], "identifier": "CVE-2021-29521", "identifiers": [ "GHSA-hr84-fqvp-48mm", "CVE-2021-29521" ], "not_impacted": "All versions before 2.3.0, all versions starting from 2.3.3 before 2.4.0, all versions starting from 2.4.2", "package_slug": "pypi/tensorflow-gpu", "pubdate": "2021-05-21", "solution": "Upgrade to versions 2.3.3, 2.4.2 or above.", "title": "Incorrect Calculation of Buffer Size", "urls": [ "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hr84-fqvp-48mm", "https://nvd.nist.gov/vuln/detail/CVE-2021-29521", "https://github.com/tensorflow/tensorflow/commit/c57c0b9f3a4f8684f3489dd9a9ec627ad8b599f5", "https://github.com/advisories/GHSA-hr84-fqvp-48mm" ], "uuid": "1e5031e5-489c-490f-a20c-c20b6ac7c971" }, { "affected_range": "\u003e=2.3.0,\u003c2.3.3||\u003e=2.4.0,\u003c2.4.2", "affected_versions": "All versions starting from 2.3.0 before 2.3.3, all versions starting from 2.4.0 before 2.4.2", "cvss_v2": "AV:L/AC:L/Au:N/C:N/I:N/A:P", "cvss_v3": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "cwe_ids": [ "CWE-1035", "CWE-131", "CWE-937" ], "date": "2021-05-20", "description": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` (i.e., `std::vector\u003cabsl::flat_hash_map\u003cint64,T\u003e\u003e` data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape (that is, all elements are non-negative) solves this issue.", "fixed_versions": [ "2.5.0" ], "identifier": "CVE-2021-29521", "identifiers": [ "CVE-2021-29521", "GHSA-hr84-fqvp-48mm" ], "not_impacted": "All versions before 2.3.0, all versions starting from 2.3.3 before 2.4.0, all versions starting from 2.4.2", "package_slug": "pypi/tensorflow", "pubdate": "2021-05-14", "solution": "Upgrade to version 2.5.0 or above.", "title": "Incorrect Calculation of Buffer Size", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2021-29521" ], "uuid": "97be527f-dce1-4cc2-ae86-e0e4a344df09" } ] }, "nvd.nist.gov": { "configurations": { "CVE_data_version": "4.0", "nodes": [ { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*", "cpe_name": [], "versionEndExcluding": "2.3.3", "versionStartIncluding": "2.3.0", "vulnerable": true }, { "cpe23Uri": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*", "cpe_name": [], "versionEndExcluding": "2.4.2", "versionStartIncluding": "2.4.0", "vulnerable": true } ], "operator": "OR" } ] }, "cve": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2021-29521" }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "en", "value": "TensorFlow is an end-to-end open source platform for machine learning. Specifying a negative dense shape in `tf.raw_ops.SparseCountSparseOutput` results in a segmentation fault being thrown out from the standard library as `std::vector` invariants are broken. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L199-L213) assumes the first element of the dense shape is always positive and uses it to initialize a `BatchedMap\u003cT\u003e` (i.e., `std::vector\u003cabsl::flat_hash_map\u003cint64,T\u003e\u003e`(https://github.com/tensorflow/tensorflow/blob/8f7b60ee8c0206a2c99802e3a4d1bb55d2bc0624/tensorflow/core/kernels/count_ops.cc#L27)) data structure. If the `shape` tensor has more than one element, `num_batches` is the first value in `shape`. Ensuring that the `dense_shape` argument is a valid tensor shape (that is, all elements are non-negative) solves this issue. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "en", "value": "CWE-131" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/tensorflow/tensorflow/commit/c57c0b9f3a4f8684f3489dd9a9ec627ad8b599f5", "refsource": "MISC", "tags": [ "Patch", "Third Party Advisory" ], "url": "https://github.com/tensorflow/tensorflow/commit/c57c0b9f3a4f8684f3489dd9a9ec627ad8b599f5" }, { "name": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hr84-fqvp-48mm", "refsource": "CONFIRM", "tags": [ "Exploit", "Patch", "Third Party Advisory" ], "url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-hr84-fqvp-48mm" } ] } }, "impact": { "baseMetricV2": { "acInsufInfo": false, "cvssV2": { "accessComplexity": "LOW", "accessVector": "LOCAL", "authentication": "NONE", "availabilityImpact": "PARTIAL", "baseScore": 2.1, "confidentialityImpact": "NONE", "integrityImpact": "NONE", "vectorString": "AV:L/AC:L/Au:N/C:N/I:N/A:P", "version": "2.0" }, "exploitabilityScore": 3.9, "impactScore": 2.9, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "LOW", "userInteractionRequired": false }, "baseMetricV3": { "cvssV3": { "attackComplexity": "LOW", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "baseScore": 5.5, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" }, "exploitabilityScore": 1.8, "impactScore": 3.6 } }, "lastModifiedDate": "2021-05-20T17:19Z", "publishedDate": "2021-05-14T20:15Z" } } }
Loading…
Loading…
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.