aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2022-09-19 09:43:19 +0300
committerHerbert Xu <[email protected]>2022-09-30 13:57:49 +0800
commitcaca37cf6c749ff0303f68418cfe7b757a4e0697 (patch)
treefa7aff4413513e5bb300f74e96714a8dd348ed47 /lib/mpi/mpi-sub-ui.c
parentf78f6f0bf34fd85c17ebcb31d645536112aa25d3 (diff)
crypto: marvell/octeontx - prevent integer overflows
The "code_length" value comes from the firmware file. If your firmware is untrusted realistically there is probably very little you can do to protect yourself. Still we try to limit the damage as much as possible. Also Smatch marks any data read from the filesystem as untrusted and prints warnings if it not capped correctly. The "code_length * 2" can overflow. The round_up(ucode_size, 16) + sizeof() expression can overflow too. Prevent these overflows. Fixes: d9110b0b01ff ("crypto: marvell - add support for OCTEON TX CPT engine") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions