Back to Paddle

Pdsa 2023 021

security/advisory/pdsa-2023-021.md

3.3.1979 B
Original Source

PDSA-2023-021: Null pointer dereference in paddle.crop

CVE Number

CVE-2023-52312

Impact

Null pointer dereference in paddle.crop when tensor dims are invalid . The PoC is as follows:

python
import paddle
import numpy as np

x = paddle.to_tensor(np.random.uniform(0, 10, [2, 2]).astype(np.int32))
shape = paddle.to_tensor([-1, 0], dtype='int32')
offsets = paddle.to_tensor([], dtype='int32')

out = paddle.crop(x, shape, offsets)

Patches

We have patched the issue in commit c074de6911944d5d30d28cc7ce2c7099f1c87bce. The fix will be included in PaddlePaddle 2.6.0.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by Peng Zhou (zpbrent) from Shanghai University.