diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-09-15 17:11:44 +0300 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2022-09-20 00:32:27 +0300 |
commit | 7d7f8fe4e399519cc9ac68a475fec6d3a996341b (patch) | |
tree | 8ee0dc8a957bd0234048d8eb8bf047d0c5027c4f /drivers/remoteproc/pru_rproc.c | |
parent | fa25b944174a6a25a14a2bb1c52cf74d5ad95140 (diff) | |
download | linux-7d7f8fe4e399519cc9ac68a475fec6d3a996341b.tar.xz |
remoteproc: Harden rproc_handle_vdev() against integer overflow
The struct_size() macro protects against integer overflows but adding
"+ rsc->config_len" introduces the risk of integer overflows again.
Use size_add() to be safe.
Fixes: c87846571587 ("remoteproc: use struct_size() helper")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/YyMyoPoGOJUcEpZT@kili
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc/pru_rproc.c')
0 files changed, 0 insertions, 0 deletions