CVE-2021-29608

Source
https://cve.org/CVERecord?id=CVE-2021-29608
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29608.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29608
Aliases
Related
Published
2021-05-14T20:15:15.803Z
Modified
2026-03-13T22:00:12.829999Z
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. Due to lack of validation in tf.raw_ops.RaggedTensorToTensor, an attacker can exploit an undefined behavior if input arguments are empty. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/raggedtensortotensorop.cc#L356-L360) only checks that one of the tensors is not empty, but does not check for the other ones. There are multiple DCHECK validations to prevent heap OOB, but these are no-op in release builds, hence they don't prevent anything. The fix will be included in TensorFlow 2.5.0. We will also cherrypick these commits 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
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "2.1.4"
        },
        {
            "introduced": "2.2.0"
        },
        {
            "fixed": "2.2.3"
        },
        {
            "introduced": "2.3.0"
        },
        {
            "fixed": "2.3.3"
        },
        {
            "introduced": "2.4.0"
        },
        {
            "fixed": "2.4.2"
        }
    ]
}

Database specific

vanir_signatures
[
    {
        "signature_type": "Line",
        "deprecated": false,
        "id": "CVE-2021-29608-9bac07fd",
        "target": {
            "file": "tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "297848537437013270431059876612001787558",
                "209681301969152117928165261862015457299",
                "166018209318291324224501329322710774118",
                "73482831109764674259720641944552373336",
                "27829288452007872853762420861852460277",
                "106835929023457931786732367699317880640",
                "6170122786494338025413087051610846381",
                "209921729186114257279926686470157071191",
                "224037023355246668888069852437447355832",
                "143122612808373158215428658515677481382",
                "208559248787608483064716825123230289655",
                "284939494610827365467037861468405145678",
                "162402071281529480883019592886079948349",
                "228444824470354092738758439020461505727",
                "318261652120323461120165933659214545662",
                "43728872660346604508597650386298090804",
                "2410389750711933446027924866544607793",
                "109415049946756972115994067483475735808",
                "178981221351963592004832868886109842047",
                "168846703144013571935572356498424677041",
                "172833242916951617559730043353388337492",
                "39982722071425773069656052018268020487",
                "36144556323819937496649629866213117733",
                "253723389608850802510055038890953831334",
                "122464976018273334746325188826498386399",
                "88757261466386833301521360041645675700",
                "118712825691397195963095850034550967286",
                "234532927204328953692114402209992425125",
                "216770770446997022275815671259044096045",
                "224754537680135727871139823445875427033",
                "22934318445214743126769322219963062661",
                "89791954598453925584347864246076726025",
                "25287365442537521955879595358581124724",
                "63978234852089265650844513113367784760",
                "59566876241232561795442073805754572044",
                "74914138686874437372339074698021476789",
                "42283856558767351283720524026229941230",
                "27337476825836754657814942664668922929",
                "228598926067598159407557501040402032925",
                "233200548681517801024212818062840620493",
                "239197063647377325490780138600411303115",
                "107396893034794526068403721316550754540",
                "84365614028170489622265723408093974108",
                "196176944167035235536574678998364004967",
                "60275375074503957235107538518761234206",
                "67131772162783293626026510912418085555",
                "281529616106781670239324493612351330249",
                "193402570767729763037094442176266763239",
                "283946892745834898735418364879067586178",
                "140468828843151079230033846747535869948"
            ]
        },
        "signature_version": "v1",
        "source": "https://github.com/tensorflow/tensorflow/commit/c4d7afb6a5986b04505aca4466ae1951686c80f6"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "id": "CVE-2021-29608-c2ba6324",
        "target": {
            "file": "tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "167043840453157900431467451878395386366",
                "278994113256611250724258513999170603783",
                "183963932834839107604429801913804307147",
                "322451706284865770715113899046288408491"
            ]
        },
        "signature_version": "v1",
        "source": "https://github.com/tensorflow/tensorflow/commit/f94ef358bb3e91d517446454edff6535bcfe8e4a"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-29608.json"