CVE-2021-29535

Source
https://cve.org/CVERecord?id=CVE-2021-29535
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29535.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29535
Aliases
Related
Published
2021-05-14T20:15:12.210Z
Modified
2026-02-05T06:31:21.095341Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow in QuantizedMul by passing in invalid thresholds for the quantization. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/87cf4d3ea9949051e50ca3f071fc909538a51cd0/tensorflow/core/kernels/quantizedmulop.cc#L287-L290) assumes that the 4 arguments are always valid scalars and tries to access the numeric value directly. However, if any of these tensors is empty, then .flat<T>() is an empty buffer and accessing the element at position 0 results in overflow. 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

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29535.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "124002366561504606295200853967085920167",
                "49975480822971769738770117044568989299",
                "278273678958373209629526300443473151263",
                "319020627723802924468952495718039390833",
                "246676316328215079126997770839446637382",
                "141695210354493539755729085588781818961",
                "231337139793303969711967009585951364053"
            ]
        },
        "signature_type": "Line",
        "target": {
            "file": "tensorflow/core/kernels/quantized_mul_op.cc"
        },
        "source": "https://github.com/tensorflow/tensorflow/commit/efea03b38fb8d3b81762237dc85e579cc5fc6e87",
        "id": "CVE-2021-29535-9e5d03d0",
        "signature_version": "v1"
    }
]