Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 17bb0971 authored by Nicolas Toromanoff's avatar Nicolas Toromanoff Committed by Greg Kroah-Hartman
Browse files

crypto: stm32/cryp - fix xts and race condition in crypto_engine requests



[ Upstream commit d703c7a994ee34b7fa89baf21631fca0aa9f17fc ]

Don't erase key:
If key is erased before the crypto_finalize_.*_request() call, some
pending process will run with a key={ 0 }.
Moreover if the key is reset at end of request, it breaks xts chaining
mode, as for last xts block (in case input len is not a multiple of
block) a new AES request is started without calling again set_key().

Fixes: 9e054ec2 ("crypto: stm32 - Support for STM32 CRYP crypto module")

Signed-off-by: default avatarNicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fe211ebe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment