Commit 00d9c7d2 authored by Eric Biggers's avatar Eric Biggers Committed by Lee Jones
Browse files

UPSTREAM: blk-crypto: fix check for too-large dun_bytes



dun_bytes needs to be less than or equal to the IV size of the
encryption mode, not just less than or equal to BLK_CRYPTO_MAX_IV_SIZE.

Currently this doesn't matter since blk_crypto_init_key() is never
actually passed invalid values, but we might as well fix this.

Fixes: a892c8d5 ("block: Inline encryption support for blk-mq")
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20210825055918.51975-1-ebiggers@kernel.org


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
(cherry picked from commit cc40b722)
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Change-Id: I03f24a0c8b5ada4fa4fa4082feb28988bff6d43e
parent c79b9571
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment