CVE-2021-29609 – Incomplete validation in `SparseAdd`
https://notcve.org/view.php?id=CVE-2021-29609
TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `SparseAdd` results in allowing attackers to exploit undefined behavior (dereferencing null pointers) as well as write outside of bounds of heap allocated data. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/sparse_add_op.cc) has a large set of validation for the two sparse tensor inputs (6 tensors in total), but does not validate that the tensors are not empty or that the second dimension of `*_indices` matches the size of corresponding `*_shape`. This allows attackers to send tensor triples that represent invalid sparse tensors to abuse code assumptions that are not protected by validation. The fix will be included in TensorFlow 2.5.0. • https://github.com/tensorflow/tensorflow/commit/41727ff06111117bdf86b37db198217fd7a143cc https://github.com/tensorflow/tensorflow/commit/6fd02f44810754ae7481838b6a67c5df7f909ca3 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-cjc7-49v2-jp64 • CWE-476: NULL Pointer Dereference CWE-665: Improper Initialization CWE-787: Out-of-bounds Write •
CVE-2021-29610 – Invalid validation in `QuantizeAndDequantizeV2`
https://notcve.org/view.php?id=CVE-2021-29610
TensorFlow is an end-to-end open source platform for machine learning. The validation in `tf.raw_ops.QuantizeAndDequantizeV2` allows invalid values for `axis` argument:. The validation(https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L74-L77) uses `||` to mix two different conditions. If `axis_ < -1` the condition in `OP_REQUIRES` will still be true, but this value of `axis_` results in heap underflow. This allows attackers to read/write to other data on the heap. • https://github.com/tensorflow/tensorflow/commit/c5b0d5f8ac19888e46ca14b0e27562e7fbbee9a9 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-mq5c-prh3-3f3h • CWE-665: Improper Initialization CWE-787: Out-of-bounds Write •
CVE-2021-29611 – Incomplete validation in `SparseReshape`
https://notcve.org/view.php?id=CVE-2021-29611
TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `SparseReshape` results in a denial of service based on a `CHECK`-failure. The implementation(https://github.com/tensorflow/tensorflow/blob/e87b51ce05c3eb172065a6ea5f48415854223285/tensorflow/core/kernels/sparse_reshape_op.cc#L40) has no validation that the input arguments specify a valid sparse tensor. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2 and TensorFlow 2.3.3, as these are the only affected versions. • https://github.com/tensorflow/tensorflow/commit/1d04d7d93f4ed3854abf75d6b712d72c3f70d6b6 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-9rpc-5v9q-5r7f • CWE-20: Improper Input Validation CWE-665: Improper Initialization •
CVE-2021-29612 – Heap buffer overflow in `BandedTriangularSolve`
https://notcve.org/view.php?id=CVE-2021-29612
TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a heap buffer overflow in Eigen implementation of `tf.raw_ops.BandedTriangularSolve`. The implementation(https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/linalg/banded_triangular_solve_op.cc#L269-L278) calls `ValidateInputTensors` for input validation but fails to validate that the two tensors are not empty. Furthermore, since `OP_REQUIRES` macro only stops execution of current function after setting `ctx->status()` to a non-OK value, callers of helper functions that use `OP_REQUIRES` must check value of `ctx->status()` before continuing. This doesn't happen in this op's implementation(https://github.com/tensorflow/tensorflow/blob/eccb7ec454e6617738554a255d77f08e60ee0808/tensorflow/core/kernels/linalg/banded_triangular_solve_op.cc#L219), hence the validation that is present is also not effective. • https://github.com/tensorflow/tensorflow/commit/0ab290774f91a23bebe30a358fde4e53ab4876a0 https://github.com/tensorflow/tensorflow/commit/ba6822bd7b7324ba201a28b2f278c29a98edbef2 https://github.com/tensorflow/tensorflow/security/advisories/GHSA-2xgj-xhgf-ggjv • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') CWE-787: Out-of-bounds Write •
CVE-2021-29613 – Incomplete validation in `tf.raw_ops.CTCLoss`
https://notcve.org/view.php?id=CVE-2021-29613
TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `tf.raw_ops.CTCLoss` allows an attacker to trigger an OOB read from heap. 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. TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático. • https://github.com/tensorflow/tensorflow/commit/14607c0707040d775e06b6817325640cb4b5864c https://github.com/tensorflow/tensorflow/commit/4504a081af71514bb1828048363e6540f797005b https://github.com/tensorflow/tensorflow/security/advisories/GHSA-vvg4-vgrv-xfr7 • CWE-125: Out-of-bounds Read CWE-665: Improper Initialization •