dm crypt: Fix reqsize in crypt_iv_eboiv_gen
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Oct 2023 01:41:55 +0000 (09:41 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Oct 2023 02:39:18 +0000 (10:39 +0800)
commit152d0bcdf1efcb54a4fa20f694e9c7bbb6d06cbf
tree7962c9ec572e92fca5d24af8c66fe451552a9a81
parent21155620fbf2edbb071144894ff9d67ba9a1faa0
dm crypt: Fix reqsize in crypt_iv_eboiv_gen

A skcipher_request object is made up of struct skcipher_request
followed by a variable-sized trailer.  The allocation of the
skcipher_request and IV in crypt_iv_eboiv_gen is missing the
memory for struct skcipher_request.  Fix it by adding it to
reqsize.

Fixes: e3023094dffb ("dm crypt: Avoid using MAX_CIPHER_BLOCKSIZE")
Cc: <stable@vger.kernel.org> #6.5+
Reported-by: Tatu Heikkilä <tatu.heikkila@gmail.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/md/dm-crypt.c