linux/drivers/crypto
Dan Carpenter 3a720eb890 crypto: cavium - prevent integer overflow loading firmware
[ Upstream commit 2526d6bf27 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:25:43 +02:00
..
allwinner crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs() 2022-08-21 15:15:40 +02:00
amcc
amlogic
axis
bcm
caam
cavium crypto: cavium - prevent integer overflow loading firmware 2022-10-26 13:25:43 +02:00
ccp crypto: ccp - Release dma channels before dmaengine unrgister 2022-10-26 13:25:42 +02:00
ccree
chelsio
hisilicon crypto: hisilicon/zip - fix mismatch in get/set sgl_sge_nr 2022-10-26 13:25:41 +02:00
inside-secure crypto: inside-secure - Change swab to swab32 2022-10-26 13:25:42 +02:00
marvell crypto: marvell/octeontx - prevent integer overflows 2022-10-26 13:25:43 +02:00
mediatek
nx powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr 2022-06-09 10:20:58 +02:00
qat crypto: qat - fix DMA transfer direction 2022-10-26 13:25:42 +02:00
qce
rockchip
stm32
ux500
virtio
vmx
xilinx
atmel-aes-regs.h
atmel-aes.c
atmel-authenc.h
atmel-ecc.c
atmel-i2c.c
atmel-i2c.h
atmel-sha-regs.h
atmel-sha.c
atmel-sha204a.c
atmel-tdes-regs.h
atmel-tdes.c
exynos-rng.c
geode-aes.c
geode-aes.h
hifn_795x.c
img-hash.c
ixp4xx_crypto.c
Kconfig
Makefile
mxs-dcp.c
n2_asm.S
n2_core.c
n2_core.h
omap-aes-gcm.c
omap-aes.c
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c
padlock-aes.c
padlock-sha.c
picoxcell_crypto_regs.h
picoxcell_crypto.c
qcom-rng.c
s5p-sss.c
sa2ul.c
sa2ul.h
sahara.c crypto: sahara - don't sleep when in softirq 2022-10-26 13:25:41 +02:00
talitos.c
talitos.h