CVE-2021-29583

Source
https://cve.org/CVERecord?id=CVE-2021-29583
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29583.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29583
Aliases
Related
Published
2021-05-14T20:15:14.437Z
Modified
2026-02-16T07:50:31.641477Z
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. The implementation of tf.raw_ops.FusedBatchNorm is vulnerable to a heap buffer overflow. If the tensors are empty, the same implementation can trigger undefined behavior by dereferencing null pointers. The implementation(https://github.com/tensorflow/tensorflow/blob/57d86e0db5d1365f19adcce848dfc1bf89fdd4c7/tensorflow/core/kernels/fusedbatchnorm_op.cc) fails to validate that scale, offset, mean and variance (the last two only when required) all have the same number of elements as the number of channels of x. This results in heap out of bounds reads when the buffers backing these tensors are indexed past their boundary. If the tensors are empty, the validation mentioned in the above paragraph would also trigger and prevent the undefined behavior. 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

vanir_signatures
[
    {
        "signature_type": "Line",
        "target": {
            "file": "tensorflow/core/kernels/fused_batch_norm_op.cc"
        },
        "id": "CVE-2021-29583-761c4cca",
        "source": "https://github.com/tensorflow/tensorflow/commit/6972f9dfe325636b3db4e0bc517ee22a159365c0",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "165434326593599524809702642877709445550",
                "157968490007356240441194210225564428150",
                "89176921479156636947887659694814954904",
                "237032072609586758469753231819606387905",
                "154973693142458072555414071198634653141",
                "266615818765870857568635733120451712215",
                "152416638425586280204960791698012620882"
            ],
            "threshold": 0.9
        },
        "deprecated": false
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29583.json"