CVE-2021-37669 – Crash in NMS ops caused by integer conversion to unsigned in TensorFlow
https://notcve.org/view.php?id=CVE-2021-37669
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause denial of service in applications serving models using `tf.raw_ops.NonMaxSuppressionV5` by triggering a division by 0. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/image/non_max_suppression_op.cc#L170-L271) uses a user controlled argument to resize a `std::vector`. However, as `std::vector::resize` takes the size argument as a `size_t` and `output_size` is an `int`, there is an implicit conversion to unsigned. If the attacker supplies a negative value, this conversion results in a crash. • https://github.com/tensorflow/tensorflow/commit/3a7362750d5c372420aa8f0caf7bf5b5c3d0f52d https://github.com/tensorflow/tensorflow/commit/b5cdbf12ffcaaffecf98f22a6be5a64bb96e4f58 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-vmjw-c2vp-p33c • CWE-681: Incorrect Conversion between Numeric Types •
CVE-2021-37673 – `CHECK`-fail in `MapStage` in TensorFlow
https://notcve.org/view.php?id=CVE-2021-37673
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a denial of service via a `CHECK`-fail in `tf.raw_ops.MapStage`. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/map_stage_op.cc#L513) does not check that the `key` input is a valid non-empty tensor. We have patched the issue in GitHub commit d7de67733925de196ec8863a33445b73f9562d1d. The fix will be included in TensorFlow 2.6.0. • https://github.com/tensorflow/tensorflow/commit/d7de67733925de196ec8863a33445b73f9562d1d https://github.com/tensorflow/tensorflow/security/advisories/GHSA-278g-rq84-9hmg • CWE-20: Improper Input Validation •
CVE-2021-37663 – Incomplete validation in `QuantizeV2` in TensorFlow
https://notcve.org/view.php?id=CVE-2021-37663
TensorFlow is an end-to-end open source platform for machine learning. In affected versions due to incomplete validation in `tf.raw_ops.QuantizeV2`, an attacker can trigger undefined behavior via binding a reference to a null pointer or can access data outside the bounds of heap allocated arrays. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/quantize_op.cc#L59) has some validation but does not check that `min_range` and `max_range` both have the same non-zero number of elements. If `axis` is provided (i.e., not `-1`), then validation should check that it is a value in range for the rank of `input` tensor and then the lengths of `min_range` and `max_range` inputs match the `axis` dimension of the `input` tensor. We have patched the issue in GitHub commit 6da6620efad397c85493b8f8667b821403516708. • https://github.com/tensorflow/tensorflow/commit/6da6620efad397c85493b8f8667b821403516708 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-g25h-jr74-qp5j • CWE-20: Improper Input Validation •
CVE-2021-37682 – Use of unitialized value in TensorFlow Lite
https://notcve.org/view.php?id=CVE-2021-37682
TensorFlow is an end-to-end open source platform for machine learning. In affected versions all TFLite operations that use quantization can be made to use unitialized values. [For example](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/lite/kernels/depthwise_conv.cc#L198-L200). The issue stems from the fact that `quantization.params` is only valid if `quantization.type` is different that `kTfLiteNoQuantization`. However, these checks are missing in large parts of the code. • https://github.com/tensorflow/tensorflow/commit/4a91f2069f7145aab6ba2d8cfe41be8a110c18a5 https://github.com/tensorflow/tensorflow/commit/537bc7c723439b9194a358f64d871dd326c18887 https://github.com/tensorflow/tensorflow/commit/8933b8a21280696ab119b63263babdb54c298538 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-4c4g-crqm-xrxw • CWE-908: Use of Uninitialized Resource •
CVE-2021-37674 – Incomplete validation in `MaxPoolGrad` in TensorFlow
https://notcve.org/view.php?id=CVE-2021-37674
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can trigger a denial of service via a segmentation fault in `tf.raw_ops.MaxPoolGrad` caused by missing validation. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/maxpooling_op.cc) misses some validation for the `orig_input` and `orig_output` tensors. The fixes for CVE-2021-29579 were incomplete. We have patched the issue in GitHub commit 136b51f10903e044308cf77117c0ed9871350475. • https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/advisory/tfsa-2021-068.md https://github.com/tensorflow/tensorflow/commit/136b51f10903e044308cf77117c0ed9871350475 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-7ghq-fvr3-pj2x • CWE-20: Improper Input Validation CWE-1284: Improper Validation of Specified Quantity in Input •