linux/drivers/crypto/cavium
Dan Carpenter 2526d6bf27 crypto: cavium - prevent integer overflow loading firmware
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 "ntohl(ucode->code_length) * 2" multiplication can have an
integer overflow.

Fixes: 9e2c7d9994 ("crypto: cavium - Add Support for Octeon-tx CPT Engine")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-09-30 13:57:49 +08:00
..
cpt crypto: cavium - prevent integer overflow loading firmware 2022-09-30 13:57:49 +08:00
nitrox crypto: cavium/nitrox - remove check of list iterator against head past the loop body 2022-04-08 16:26:43 +08:00
zip crypto: cavium/zip - register algorithm only if hardware is present 2022-03-03 10:46:19 +12:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00