diff options
author | Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> | 2021-11-30 08:54:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 10:53:56 +0100 |
commit | 533af1621d1c8f89b61593f88b7e0b30592e3013 (patch) | |
tree | e1e69ba63f8486f45c5835579fd3314046d10716 /README | |
parent | 5deb24e50372357cf975e85067f09a57ad33dc99 (diff) | |
download | linux-stable-533af1621d1c8f89b61593f88b7e0b30592e3013.tar.gz linux-stable-533af1621d1c8f89b61593f88b7e0b30592e3013.tar.bz2 linux-stable-533af1621d1c8f89b61593f88b7e0b30592e3013.zip |
crypto: stm32/cryp - check early input data
[ Upstream commit 39e6e699c7fb92bdb2617b596ca4a4ea35c5d2a7 ]
Some auto tests failed because driver wasn't returning the expected
error with some input size/iv value/tag size.
Now:
Return 0 early for empty buffer. (We don't need to start the engine for
an empty input buffer).
Accept any valid authsize for gcm(aes).
Return -EINVAL if iv for ccm(aes) is invalid.
Return -EINVAL if buffer size is a not a multiple of algorithm block size.
Fixes: 9e054ec21ef8 ("crypto: stm32 - Support for STM32 CRYP crypto module")
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions