summaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-09-19 09:43:27 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-09-30 13:57:49 +0800
commit2526d6bf27d15054bb0778b2f7bc6625fd934905 (patch)
treee11d83d5b3c1ebad04b1a4a9811b7d8efab6adf3 /net/lapb/lapb_subr.c
parentcaca37cf6c749ff0303f68418cfe7b757a4e0697 (diff)
downloadlwn-2526d6bf27d15054bb0778b2f7bc6625fd934905.tar.gz
lwn-2526d6bf27d15054bb0778b2f7bc6625fd934905.zip
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>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions