Home
last modified time | relevance | path

Searched hist:"2526 d6bf27d15054bb0778b2f7bc6625fd934905" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/crypto/cavium/cpt/
H A Dcptpf_main.cdiff 2526d6bf27d15054bb0778b2f7bc6625fd934905 Mon Sep 19 08:43:27 CEST 2022 Dan Carpenter <dan.carpenter@oracle.com> 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: 9e2c7d99941d ("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>