Skip to content
Commit dd52b5ee authored by David Gstir's avatar David Gstir Committed by Herbert Xu
Browse files

crypto: mxs-dcp - Ensure payload is zero when using key slot



We could leak stack memory through the payload field when running
AES with a key from one of the hardware's key slots. Fix this by
ensuring the payload field is set to 0 in such cases.

This does not affect the common use case when the key is supplied
from main memory via the descriptor payload.

Signed-off-by: default avatarDavid Gstir <david@sigma-star.at>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202405270146.Y9tPoil8-lkp@intel.com/


Fixes: 3d16af0b ("crypto: mxs-dcp: Add support for hardware-bound keys")
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent addea585
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