CVE-2023-38672
When dim contains 0, paddle.linalg.matrix_power
will trigger a float point exception. The PoC is as follows:
import paddle
import numpy as np
from paddle.linalg import matrix_power
x = paddle.to_tensor(np.random.uniform(-10, 10, [1, 1, 0, 0]).astype(np.float32))
matrix_power(x, -1)
We have patched the issue in commit 09926af166b060c9a9845c309110d3baa82921fd. The fix will be included in PaddlePaddle 2.5.0.
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
This vulnerability has been reported by Tong Liu of ShanghaiTech University.