CVE-2021-37691 – Division by zero in LSH in TensorFlow Lite
https://notcve.org/view.php?id=CVE-2021-37691
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can craft a TFLite model that would trigger a division by zero error in LSH [implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/lsh_projection.cc#L118). We have patched the issue in GitHub commit 0575b640091680cfb70f4dd93e70658de43b94f9. The fix will be included in TensorFlow 2.6.0. We will also cherrypick thiscommit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range. • https://github.com/tensorflow/tensorflow/commit/0575b640091680cfb70f4dd93e70658de43b94f9 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-27qf-jwm8-g7f3 • CWE-369: Divide By Zero •
CVE-2021-37679 – Heap OOB in nested `tf.map_fn` with `RaggedTensor`s in TensorFlow
https://notcve.org/view.php?id=CVE-2021-37679
TensorFlow is an end-to-end open source platform for machine learning. In affected versions it is possible to nest a `tf.map_fn` within another `tf.map_fn` call. However, if the input tensor is a `RaggedTensor` and there is no function signature provided, code assumes the output is a fully specified tensor and fills output buffer with uninitialized contents from the heap. The `t` and `z` outputs should be identical, however this is not the case. The last row of `t` contains data from the heap which can be used to leak other memory information. • https://github.com/tensorflow/tensorflow/commit/4e2565483d0ffcadc719bd44893fb7f609bb5f12 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-g8wg-cjwc-xhhp • CWE-125: Out-of-bounds Read CWE-681: Incorrect Conversion between Numeric Types •
CVE-2021-37672 – Heap OOB in `SdcaOptimizerV2` in TensorFlow
https://notcve.org/view.php?id=CVE-2021-37672
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can read from outside of bounds of heap allocated data by sending specially crafted illegal arguments to `tf.raw_ops.SdcaOptimizerV2`. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/sdca_internal.cc#L320-L353) does not check that the length of `example_labels` is the same as the number of examples. We have patched the issue in GitHub commit a4e138660270e7599793fa438cd7b2fc2ce215a6. The fix will be included in TensorFlow 2.6.0. • https://github.com/tensorflow/tensorflow/commit/a4e138660270e7599793fa438cd7b2fc2ce215a6 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-5hj3-vjjf-f5m7 • CWE-125: Out-of-bounds Read •
CVE-2021-37687 – Heap OOB in TensorFlow Lite's `Gather*` implementations
https://notcve.org/view.php?id=CVE-2021-37687
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. • https://github.com/tensorflow/tensorflow/commit/bb6a0383ed553c286f87ca88c207f6774d5c4a8f https://github.com/tensorflow/tensorflow/commit/eb921122119a6b6e470ee98b89e65d721663179d https://github.com/tensorflow/tensorflow/security/advisories/GHSA-jwf9-w5xm-f437 • CWE-125: Out-of-bounds Read •
CVE-2021-37685 – Heap OOB in TensorFlow Lite
https://notcve.org/view.php?id=CVE-2021-37685
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`expand_dims.cc`](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/expand_dims.cc#L36-L50) contains a vulnerability which allows reading one element outside of bounds of heap allocated data. If `axis` is a large negative value (e.g., `-100000`), then after the first `if` it would still be negative. The check following the `if` statement will pass and the `for` loop would read one element before the start of `input_dims.data` (when `i = 0`). We have patched the issue in GitHub commit d94ffe08a65400f898241c0374e9edc6fa8ed257. • https://github.com/tensorflow/tensorflow/commit/d94ffe08a65400f898241c0374e9edc6fa8ed257 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-c545-c4f9-rf6v • CWE-125: Out-of-bounds Read •