CVE-2021-29541

Source
https://cve.org/CVERecord?id=CVE-2021-29541
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29541.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29541
Aliases
Related
Published
2021-05-14T20:15:12.487Z
Modified
2026-02-28T04:35:23.255915Z
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 dereference of a null pointer in tf.raw_ops.StringNGrams. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1cdd4da14282210cc759e468d9781741ac7d01bf/tensorflow/core/kernels/stringngramsop.cc#L67-L74) does not fully validate the data_splits argument. This would result in ngrams_data(https://github.com/tensorflow/tensorflow/blob/1cdd4da14282210cc759e468d9781741ac7d01bf/tensorflow/core/kernels/stringngramsop.cc#L106-L110) to be a null pointer when the output would be computed to have 0 or negative size. Later writes to the output tensor would then cause a null pointer dereference. 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
[
    {
        "id": "CVE-2021-29541-e874b66d",
        "signature_version": "v1",
        "deprecated": false,
        "source": "https://github.com/tensorflow/tensorflow/commit/ba424dd8f16f7110eea526a8086f1a155f14f22b",
        "target": {
            "file": "tensorflow/core/kernels/string_ngrams_op.cc"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "57195627247613741680534829079164726143",
                "144510031586872538897705158176453270924",
                "67142721827154383847592773414742897200",
                "198660284223107093965173105128464076313",
                "84662326214440819971491155396053498454",
                "132534507564806510781756549656216176799",
                "200691599318631407204320864908507718759",
                "16770105225719283317953667027856362121",
                "300364817585889570830581672821453167062",
                "221628520155122292914626066271129826040",
                "335651150219913271764137831314776022110",
                "184467774008778873472873586113998640431",
                "279537133943222736387788191864446234549",
                "290054871212833249125691179348205222232",
                "311690171736731432233565701507438207456",
                "113940870216757540903764345358011746357",
                "30779893326960046852496776159198435969",
                "77023344599735399717363121186761084022",
                "83216137387116021136053497810571554164",
                "140176743891041545566785711845894573260",
                "183795575839910971458175928134312205846",
                "148483364633044098094999335534833305871",
                "331974045402895367520587276108357081382"
            ]
        },
        "signature_type": "Line"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29541.json"