CVE-2023-38674
When x
dim calculates stride
to 0, paddle.nanmedian
triggers FPE by numel / stride
. The PoC is as follows:
import paddle
import numpy as np
x = np.random.uniform(0,0,[0,0,0,0,0]).astype(np.float32)
x = paddle.to_tensor(x)
paddle.nanmedian(x)
We have patched the issue in commit 9bb6c669206c4bcc3ce3f6daf8a55650e190c1a1. The fix will be included in PaddlePaddle 2.6.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.