CVE-2021-29584

Source
https://cve.org/CVERecord?id=CVE-2021-29584
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29584.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29584
Aliases
Related
Published
2021-05-14T20:15:14.490Z
Modified
2026-03-13T22:01:39.914840Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a CHECK-fail in caused by an integer overflow in constructing a new tensor shape. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/0908c2f2397c099338b901b067f6495a5b96760b/tensorflow/core/kernels/sparsesplitop.cc#L66-L70) builds a dense shape without checking that the dimensions would not result in overflow. The TensorShape constructor(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framework/tensorshape.cc#L183-L188) uses a CHECK operation which triggers when InitDims(https://github.com/tensorflow/tensorflow/blob/6f9896890c4c703ae0a0845394086e2e1e523299/tensorflow/core/framework/tensorshape.cc#L212-L296) returns a non-OK status. This is a legacy implementation of the constructor and operations should use BuildTensorShapeBase or AddDimWithStatus to prevent CHECK-failures in the presence of overflows. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

References

Affected packages

Git / github.com/tensorflow/tensorflow

Affected ranges

Type
GIT
Repo
https://github.com/tensorflow/tensorflow
Events
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "2.1.4"
        },
        {
            "introduced": "2.2.0"
        },
        {
            "fixed": "2.2.3"
        },
        {
            "introduced": "2.3.0"
        },
        {
            "fixed": "2.3.3"
        },
        {
            "introduced": "2.4.0"
        },
        {
            "fixed": "2.4.2"
        }
    ]
}

Database specific

vanir_signatures
[
    {
        "signature_type": "Line",
        "deprecated": false,
        "id": "CVE-2021-29584-f001dc3c",
        "target": {
            "file": "tensorflow/core/kernels/sparse_split_op.cc"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "332391295713713710034880415121405486668",
                "307198896444852809788392920703043834320",
                "47570789246711360801307784346144220319",
                "176650197302750695380675494558326600076",
                "186404323383547783247107456174969450132",
                "215268358908790864495675904466393539806",
                "209306889157926988675643631102727045771",
                "296166053845383882065631514845143304852"
            ]
        },
        "signature_version": "v1",
        "source": "https://github.com/tensorflow/tensorflow/commit/4c0ee937c0f61c4fc5f5d32d9bb4c67428012a60"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29584.json"