{"dataType": "CVE_RECORD", "containers": {"adp": [{"metrics": [{"other": {"type": "Unknown", "content": {"data": "{\"description\":\"unimportant\"}"}}}], "affected": [{"vendor": "debian", "product": "tensorflow", "platforms": ["forky", "sid"], "defaultStatus": "unaffected"}], "references": [{"url": "https://security-tracker.debian.org/tracker/CVE-2021-41219"}], "descriptions": [{"lang": "en", "value": "TensorFlow is an open source platform for machine learning. In affected versions the code for sparse matrix multiplication is vulnerable to undefined behavior via binding a reference to `nullptr`. This occurs whenever the dimensions of `a` or `b` are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range."}], "providerMetadata": {"orgId": "79363d38-fa19-49d1-9214-5f28da3f3ac5", "shortName": "debian", "dateUpdated": "2021-11-05T20:50:17.000Z", "x_subShortName": "debian"}}, {"metrics": [{"other": {"type": "Unknown", "content": {"data": "{\"description\":\"High\"}"}}}], "affected": [{"vendor": "arch", "product": "tensorflow", "versions": [{"status": "affected", "version": "2.6.0-6", "lessThan": "2.6.1-1", "versionType": "custom"}], "defaultStatus": "unaffected"}], "references": [{"url": "https://security.archlinux.org/CVE-2021-41219"}], "descriptions": [{"lang": "en", "value": "In TensorFlow before version 2.6.1, the code for sparse matrix multiplication is vulnerable to undefined behavior via binding a reference to nullptr. This occurs whenever the dimensions of a or b are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access."}], "providerMetadata": {"orgId": "00000000-0000-4000-A000-000000000002", "shortName": "arch", "dateUpdated": "2021-11-06T00:15:16.000Z", "x_subShortName": "arch"}}, {"metrics": [{"cvssV3_1": {"scope": "UNCHANGED", "version": "3.1", "baseScore": 7.8, "attackVector": "LOCAL", "baseSeverity": "HIGH", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "integrityImpact": "HIGH", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "LOW", "confidentialityImpact": "HIGH"}}, {"other": {"type": "Unknown", "content": {"data": "{\"description\":\"HIGH\"}"}}}], "affected": [{"vendor": "pypi", "product": "tensorflow", "versions": [{"status": "affected", "version": "0", "lessThan": "2.4.4", "versionType": "custom"}, {"status": "affected", "version": "2.5.0", "lessThan": "2.5.2", "versionType": "custom"}, {"status": "affected", "version": "2.6.0", "lessThan": "2.6.1", "versionType": "custom"}, {"status": "affected", "version": "2.7.0rc0", "lessThan": "2.7.0", "versionType": "custom"}], "defaultStatus": "unaffected"}, {"vendor": "pypi", "product": "tensorflow-cpu", "versions": [{"status": "affected", "version": "0", "lessThan": "2.4.4", "versionType": "custom"}, {"status": "affected", "version": "2.5.0", "lessThan": "2.5.2", "versionType": "custom"}, {"status": "affected", "version": "2.6.0", "lessThan": "2.6.1", "versionType": "custom"}, {"status": "affected", "version": "2.7.0rc0", "lessThan": "2.7.0", "versionType": "custom"}], "defaultStatus": "unaffected"}, {"vendor": "pypi", "product": "tensorflow-gpu", "versions": [{"status": "affected", "version": "0", "lessThan": "2.4.4", "versionType": "custom"}, {"status": "affected", "version": "2.5.0", "lessThan": "2.5.2", "versionType": "custom"}, {"status": "affected", "version": "2.6.0", "lessThan": "2.6.1", "versionType": "custom"}, {"status": "affected", "version": "2.7.0rc0", "lessThan": "2.7.0", "versionType": "custom"}], "defaultStatus": "unaffected"}], "references": [{"url": "https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-628.yaml"}, {"url": "https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-826.yaml"}, {"url": "https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-411.yaml"}, {"url": "https://github.com/tensorflow/tensorflow"}, {"url": "https://github.com/tensorflow/tensorflow/commit/e6cf28c72ba2eb949ca950d834dd6d66bb01cfae"}, {"url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-4f99-p9c2-3j8x"}, {"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41219"}], "descriptions": [{"lang": "en", "value": "### Impact\nThe [code for sparse matrix multiplication](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/kernels/sparse_matmul_op.cc#L954-L1086) is vulnerable to undefined behavior via binding a reference to `nullptr`:\n\n```python\nimport tensorflow as tf\n  \ntf.raw_ops.SparseMatMul(\n  a=[[1.0,1.0,1.0]],\n  b=[[],[],[]],\n  transpose_a=False,\n  transpose_b=False,\n  a_is_sparse=False, \n  b_is_sparse=True)\n```\n\nThis occurs whenever the dimensions of `a` or `b` are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access.\n\n### Patches\nWe have patched the issue in GitHub commit [e6cf28c72ba2eb949ca950d834dd6d66bb01cfae](https://github.com/tensorflow/tensorflow/commit/e6cf28c72ba2eb949ca950d834dd6d66bb01cfae).\n\nThe fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, 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 members of the Aivul Team from Qihoo 360.\n"}, {"lang": "en", "value": "TensorFlow is an open source platform for machine learning. In affected versions the code for sparse matrix multiplication is vulnerable to undefined behavior via binding a reference to `nullptr`. This occurs whenever the dimensions of `a` or `b` are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range."}, {"lang": "en", "value": "Undefined behavior via `nullptr` reference binding in sparse matrix multiplication"}], "providerMetadata": {"orgId": "28c92f92-d60d-412d-b760-e73465c3df22", "shortName": "pypi", "dateUpdated": "2021-11-05T21:15:00Z", "x_subShortName": "pypi"}}], "cna": {"metrics": [{"format": "CVSS", "cvssV2_0": {"version": "2.0", "baseScore": 4.6, "accessVector": "LOCAL", "vectorString": "AV:L/AC:L/Au:N/C:P/I:P/A:P", "authentication": "NONE", "integrityImpact": "PARTIAL", "accessComplexity": "LOW", "availabilityImpact": "PARTIAL", "confidentialityImpact": "PARTIAL"}}, {"format": "CVSS", "cvssV3_1": {"scope": "UNCHANGED", "version": "3.1", "baseScore": 7.8, "attackVector": "LOCAL", "baseSeverity": "HIGH", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "integrityImpact": "HIGH", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "LOW", "confidentialityImpact": "HIGH"}}], "affected": [{"cpes": ["cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*", "cpe:2.3:a:google:tensorflow:2.6.0:*:*:*:*:*:*:*"], "vendor": "google", "product": "tensorflow", "versions": [{"status": "affected", "version": "0", "lessThan": "2.4.4", "versionType": "custom"}, {"status": "affected", "version": "2.5.0", "lessThan": "2.5.2", "versionType": "custom"}, {"status": "affected", "version": "2.6.0"}], "defaultStatus": "unaffected"}], "references": [{"url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-4f99-p9c2-3j8x", "tags": ["exploit", "patch", "third-party-advisory"]}, {"url": "https://github.com/tensorflow/tensorflow/commit/e6cf28c72ba2eb949ca950d834dd6d66bb01cfae", "tags": ["patch", "third-party-advisory"]}], "descriptions": [{"lang": "en", "value": "TensorFlow is an open source platform for machine learning. In affected versions the code for sparse matrix multiplication is vulnerable to undefined behavior via binding a reference to `nullptr`. This occurs whenever the dimensions of `a` or `b` are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range."}, {"lang": "es", "value": "TensorFlow es una plataforma de código abierto para el aprendizaje automático. En las versiones afectadas el código para la multiplicación de matrices dispersas es vulnerable a un comportamiento indefinido por medio de la vinculación de una referencia a \"nullptr\". Esto ocurre siempre que las dimensiones de \"a\" o \"b\" sean 0 o menos. En el caso de que una de ellas sea 0, es debido asignar un tensor de salida vacío (para conservar el invariante de que los tensores de salida siempre se asignan cuando la operación presenta éxito) pero no es debido escribir nada en él (es decir, debemos regresar antes de tiempo de la implementación del núcleo). De lo contrario, los intentos de escribir en este tensor vacío resultarían en un acceso OOB a la pila. La corrección será incluida en TensorFlow versión 2.7.0. También será incluida este commit en TensorFlow versión 2.6.1, TensorFlow versión 2.5.2, y TensorFlow versión 2.4.4, ya que estos también están afectados y todavía están en el rango admitido"}], "problemTypes": [{"descriptions": [{"lang": "en", "cweId": "CWE-125", "description": "CWE-125"}, {"lang": "en", "cweId": "CWE-824", "description": "CWE-824"}]}], "providerMetadata": {"orgId": "00000000-0000-4000-A000-000000000003", "shortName": "nvd", "dateUpdated": "2021-11-05T21:15:09Z", "x_subShortName": "nvd"}}}, "cveMetadata": {"cveId": "CVE-2021-41219", "state": "PUBLISHED", "dateUpdated": "2024-11-21T06:25:48Z", "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "datePublished": "2021-11-05T21:15:09Z", "assignerShortName": "GitHub_M"}, "dataVersion": "5.0"}