Google · Tensorflow · CVE-2022-41895
**Name of the Vulnerable Software and Affected Versions**
TensorFlow versions prior to 2.11
TensorFlow versions 2.10.1 and earlier
TensorFlow versions 2.9.3 and earlier
TensorFlow versions 2.8.4 and earlier
**Description**
The issue arises when the `MirrorPadGrad` function is given oversized input `paddings`, resulting in a heap OOB error. This can be triggered by providing large values for the `paddings` parameter, such as `[[0x77f00000,0xa000000]]`, in the `tf.raw ops.MirrorPadGrad` operation with the `mode` set to `'REFLECT'`.
**Recommendations**
For versions prior to 2.11, update to TensorFlow 2.11 or later.
For versions 2.10.1 and earlier, update to TensorFlow 2.10.1 or later, or apply the patch from GitHub commit 717ca98d8c3bba348ff62281fdf38dcb5ea1ec92.
For versions 2.9.3 and earlier, update to TensorFlow 2.9.3 or later, or apply the patch from GitHub commit 717ca98d8c3bba348ff62281fdf38dcb5ea1ec92.
For versions 2.8.4 and earlier, update to TensorFlow 2.8.4 or later, or apply the patch from GitHub commit 717ca98d8c3bba348ff62281fdf38dcb5ea1ec92.
As a temporary workaround, consider restricting the input values for the `paddings` parameter in the `tf.raw ops.MirrorPadGrad` operation to prevent oversized inputs.