aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2019-10-04 08:55:37 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2019-10-10 23:42:45 +1100
commit86ef1dfcb561473fbf5e199d58d18c55554d78be (patch)
tree71f2f32be1fcd98d73383d7ec9803e4d4da5ddd7 /crypto
parentcrypto: aegis128/simd - build 32-bit ARM for v8 architecture explicitly (diff)
downloadlinux-dev-86ef1dfcb561473fbf5e199d58d18c55554d78be.tar.xz
linux-dev-86ef1dfcb561473fbf5e199d58d18c55554d78be.zip
crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
commit 394a9e044702 ("crypto: cfb - add missing 'chunksize' property") adds a test vector where the input length is smaller than the IV length (the second test vector). This revealed a NULL pointer dereference in the atmel-aes driver, that is caused by passing an incorrect offset in scatterwalk_map_and_copy() when atmel_aes_complete() is called. Do not save the IV in req->info of ablkcipher_request (or equivalently req->iv of skcipher_request) when req->nbytes < ivsize, because the IV will not be further used. While touching the code, modify the type of ivsize from int to unsigned int, to comply with the return type of crypto_ablkcipher_ivsize(). Fixes: 91308019ecb4 ("crypto: atmel-aes - properly set IV after {en,de}crypt") Cc: <stable@vger.kernel.org> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions