{"id":"CVE-2021-29544","published":"2021-05-14T19:11:06Z","modified":"2024-10-31T20:41:21Z","title":"CHECK-fail in `QuantizeAndDequantizeV4Grad`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in `tf.raw_ops.QuantizeAndDequantizeV4Grad`. This is because the implementation does not validate the rank of the `input_*` tensors. In turn, this results in the tensors being passes as they are to `QuantizeAndDequantizePerChannelGradientImpl`. However, the `vec<T>` method, requires the rank to 1 and triggers a `CHECK` failure otherwise. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 as this is the only other affected version.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.5,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0031,"percentile":0.24437,"provenance":"source"},"cwes":[{"id":"CWE-754","name":"Improper Check for Unusual or Exceptional Conditions"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-6g85-3hm8-83f9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/20431e9044cf2ad3c0323c34888b192f3289af6b","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/95078c145b5a7a43ee046144005f733092756ab5/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L162-L163","tags":["x_refsource_MISC"]},{"url":"https://github.com/tensorflow/tensorflow/blob/95078c145b5a7a43ee046144005f733092756ab5/tensorflow/core/kernels/quantize_and_dequantize_op.h#L295-L306","tags":["x_refsource_MISC"]}],"priority":{"score":6.6,"factors":[{"name":"EPSS percentile","points":4.89},{"name":"CVSS severity","points":1.75}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.4.0, < 2.4.2"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":[">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-6g85-3hm8-83f9","PYSEC-2021-181"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":[">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-6g85-3hm8-83f9","PYSEC-2021-472"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":[">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-6g85-3hm8-83f9","PYSEC-2021-670"],"provenance":"source"}],"summary":{"text":"The flaw is a CHECK-fail in TensorFlow's QuantizeAndDequantizeV4Grad operation, caused by the implementation failing to validate the rank of the input_* tensors before passing them to QuantizeAndDequantizePerChannelGradientImpl, which requires rank 1. An attacker who can invoke tf.raw_ops.QuantizeAndDequantizeV4Grad with tensors of an unexpected rank can crash the process for denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:02Z"},"euvd":{"id":"EUVD-2021-0285","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2020-15265","children":[{"from":"CVE-2021-29544","to":"CVE-2021-37645","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/quantize_and_dequantize_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/20431e9044cf2ad3c0323c34888b192f3289af6b","https://github.com/tensorflow/tensorflow/commit/96f364a1ca3009f98980021c4b32be5fdcca33a1"],"basis":"shared function","functions":["QuantizeAndDequantizeV4GradientOp"]}]},{"from":"CVE-2021-29544","to":"CVE-2022-29192","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/quantize_and_dequantize_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/20431e9044cf2ad3c0323c34888b192f3289af6b","https://github.com/tensorflow/tensorflow/commit/098e7762d909bac47ce1dbabe6dfd06294cb9d58"],"basis":"shared function","functions":["QuantizeAndDequantizeV4GradientOp"]}]},{"from":"CVE-2021-29544","to":"CVE-2022-36026","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/quantize_and_dequantize_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/20431e9044cf2ad3c0323c34888b192f3289af6b","https://github.com/tensorflow/tensorflow/commit/f3f9cb38ecfe5a8a703f2c4a8fead434ef291713"],"basis":"shared function","functions":["QuantizeAndDequantizeV4GradientOp"]}]}]}}