CVE-2021-29518

Source
https://cve.org/CVERecord?id=CVE-2021-29518
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29518.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29518
Aliases
Related
Published
2021-05-14T20:15:11.437Z
Modified
2026-02-21T01:29:40.566415Z
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. In eager mode (default in TF 2.0 and later), session operations are invalid. However, users could still call the raw ops associated with them and trigger a null pointer dereference. The implementation(https://github.com/tensorflow/tensorflow/blob/eebb96c2830d48597d055d247c0e9aebaea94cd5/tensorflow/core/kernels/session_ops.cc#L104) dereferences the session state pointer without checking if it is valid. Thus, in eager mode, ctx->session_state() is nullptr and the call of the member function is 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

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29518.json"
vanir_signatures
[
    {
        "id": "CVE-2021-29518-13602c37",
        "target": {
            "file": "tensorflow/core/kernels/session_ops.cc"
        },
        "signature_version": "v1",
        "deprecated": false,
        "source": "https://github.com/tensorflow/tensorflow/commit/ff70c47a396ef1e3cb73c90513da4f5cb71bebba",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "258217736644729831485407036564608387203",
                "119044693261990561722686357651606715351",
                "92282080828232220703736488272252123311",
                "95867713300468183483428017567378506241",
                "188259389269721059014936887041963547472",
                "94525462279463429020701167491917738777",
                "228193483292393948220449820685880142141",
                "19484753901646476851882571196679519327",
                "65614322817664371352417734020462135094",
                "120931250376688304910999998461606212210",
                "117281615574995901256385985146403260365",
                "16090708564409880002854668729237707869",
                "19560198851359543579020574605385809079",
                "263072110068366534538267592400910547049"
            ]
        },
        "signature_type": "Line"
    }
]