crypto: essiv - Check ssize for decryption and in-place encryption

Move the ssize check to the start in essiv_aead_crypt so that
it's also checked for decryption and in-place encryption.

BUG=b/451938643
TEST=presubmit
RELEASE_NOTE=Fixed KCTF-6bb73db in the Linux Kernel.

cos-patch: security-high
Reported-by: Muhammad Alifa Ramdhan <ramdhan@starlabs.sg>
Fixes: be1eb7f78aa8 ("crypto: essiv - create wrapper template for ESSIV generation")
Change-Id: I71a6403f3163b12d41331375b059cd6bbb1c24d9
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Kevin Liu <zhihuil@google.com>
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/114121
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Kevin Berry <kpberry@google.com>
1 file changed