CVE-2021-29540

Source
https://cve.org/CVERecord?id=CVE-2021-29540
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29540.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29540
Aliases
Related
Published
2021-05-14T20:15:12.443Z
Modified
2026-02-04T21:33:54.195725Z
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 to occur in Conv2DBackpropFilter. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1b0296c3b8dd9bd948f924aa8cd62f87dbb7c3da/tensorflow/core/kernels/convgradfilter_ops.cc#L495-L497) computes the size of the filter tensor but does not validate that it matches the number of elements in filter_sizes. Later, when reading/writing to this buffer, code uses the value computed here, instead of the number of elements in the tensor. 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

vanir_signatures
[
    {
        "deprecated": false,
        "source": "https://github.com/tensorflow/tensorflow/commit/c570e2ecfc822941335ad48f6e10df4e21f11c96",
        "id": "CVE-2021-29540-c1d36bfe",
        "target": {
            "file": "tensorflow/core/kernels/conv_grad_filter_ops.cc"
        },
        "digest": {
            "line_hashes": [
                "324929951830919552292852552964558826722",
                "125228753382818540400591334887381218070",
                "90221298885569485258934159180681753575",
                "121956488963479845048606417661305347870",
                "286973072065033444553466007058475453628",
                "226211049892244163293098549223763689073",
                "129279513966689844778799936858437378436"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line",
        "signature_version": "v1"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29540.json"