CVE-2022-21725

Source
https://cve.org/CVERecord?id=CVE-2022-21725
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-21725.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-21725
Aliases
Downstream
Related
Published
2022-02-03T12:21:02Z
Modified
2026-08-03T14:35:31Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Division by zero in Tensorflow
Details

Tensorflow is an Open Source Machine Learning Framework. The estimator for the cost of some convolution operations can be made to execute a division by 0. The function fails to check that the stride argument is strictly positive. Hence, the fix is to add a check for the stride argument to ensure it is valid. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Database specific
{
    "cna_assigner":  "GitHub_M",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21725.json"
}
References

Affected packages

Git / github.com/tensorflow/tensorflow

Affected ranges

Type
GIT
Repo
https://github.com/tensorflow/tensorflow
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "source":  "REFERENCES"
}

Affected versions

0.*
0.5.0
0.6.0
v1.*
v1.1.0-rc1
v1.1.0-rc2
v1.12.1
v1.6.0-rc1
v1.9.0-rc2

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-21725.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "29833062081792161666005548017870540707",
                "173936579719720292403623256344268395905",
                "29160783919781677157968160320488505638",
                "46641724053112140644611597132945207883",
                "261270657023905031731651365465194925928",
                "105486346789585895539336437586888072762",
                "289327973071283131489257969913949164450",
                "76516525785390465010313759252182543601",
                "284127014168270331662102107889152591197",
                "178395313312912296623329868574203817479",
                "287135384709820192118351208362599442661",
                "317441998762747727523661160254998205124",
                "41170625725517448520778338199456765981",
                "198827970660448144038181471784394097209",
                "104926503999769377536160945162331114012",
                "37634970173969770557892736494643445151",
                "210882890693252372670126435166051300183",
                "305877696380064233814483710788752099459",
                "284127014168270331662102107889152591197",
                "178395313312912296623329868574203817479",
                "76960101022723909949595145506632015511",
                "221687124531385363322685673456230569300",
                "217354339717986963618002739411304571180",
                "144204172908090216876006948281603249115",
                "252348079102387377181133407069772359977",
                "337260350130759872171546754530353032013",
                "40083840401807088813406546839261308202",
                "171588677440116069165806940283230154073",
                "309714159776918146402144475873568820613",
                "178395313312912296623329868574203817479",
                "146009143620014892714354756175184375397",
                "105155588636108355300634373854351623741",
                "83209365193850483367099275848526192971",
                "309714159776918146402144475873568820613",
                "261537981841210438032137704090620271120",
                "35924052532745877776035581383402468909",
                "313733131701288456125085628937097868766",
                "95575575759014163078259649189584545979"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2022-21725-0203f8c3",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "170921164422964488441798060621330450275",
                "145087031434086507939685739161668472403",
                "98464348392772009462966547162584737076",
                "307029448815549509720744458272872301202",
                "191204749889529602958131077545402679268",
                "43669945047802472791772651896176668023",
                "222728328781793330892851667201763481581",
                "105632016627331921405653063340771650504",
                "220573370481956621355143353405400854134",
                "101574743412873227531523169465394456563",
                "162037738811328696453812074915264864362",
                "94138663486816938200824806803787331483",
                "21651903506955478926663283409209610081",
                "18641428060585684971749251688927803447",
                "309533070058805447338857445006417086587",
                "84312093704981084948134231666715176423"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2022-21725-11c3562b",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator_test.cc"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "54919895359600835365622889974832359897",
            "length":  1228
        },
        "id":  "CVE-2022-21725-1fc1cb68",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::PredictMaxPoolGrad"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "151710292831597662859289626391140167822",
            "length":  862
        },
        "id":  "CVE-2022-21725-31c1862e",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::PredictAvgPool"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "125260892401503456755454313376142544305",
                "39520042007943423542711692751575181984",
                "335449050479408137004993200710478089835",
                "287587699119703991754319260955399474387"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2022-21725-450ea0f9",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.h"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "35166802586136732026005820364185328363",
            "length":  1194
        },
        "id":  "CVE-2022-21725-589e0555",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::PredictFusedBatchNorm"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "21973334131829332070769834111565466465",
            "length":  934
        },
        "id":  "CVE-2022-21725-5c3da66e",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::PredictFusedBatchNormGrad"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "79878792015345273602995296816439114011",
            "length":  1138
        },
        "id":  "CVE-2022-21725-6f99050f",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::OpDimensionsFromInputs"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "74450886094222473559020773226200763292",
            "length":  1017
        },
        "id":  "CVE-2022-21725-8c30f61b",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::PredictAvgPoolGrad"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "45069419865403132480880467420472822772",
            "length":  919
        },
        "id":  "CVE-2022-21725-951b24cd",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator.cc",
            "function":  "OpLevelCostEstimator::PredictMaxPool"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "14898863193808163729554561967569096668",
            "length":  1518
        },
        "id":  "CVE-2022-21725-e3406382",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/tensorflow/tensorflow/commit/3218043d6d3a019756607643cf65574fbfef5d7a",
        "target":  {
            "file":  "tensorflow/core/grappler/costs/op_level_cost_estimator_test.cc",
            "function":  "ValidateOpDimensionsFromInputs"
        }
    }
]
vanir_signatures_modified
"2026-08-03T14:35:31Z"