David Gstir e1640fed03 crypto: mxs-dcp - Ensure payload is zero when using key slot
[ Upstream commit dd52b5eeb0f70893f762da7254e923fd23fd1379 ]

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: David Gstir <david@sigma-star.at>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202405270146.Y9tPoil8-lkp@intel.com/
Fixes: 3d16af0b4cfa ("crypto: mxs-dcp: Add support for hardware-bound keys")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 09:00:18 +02:00
..
2024-04-02 10:49:39 +08:00
2023-12-08 11:59:46 +08:00
2023-12-08 11:59:46 +08:00
2024-05-14 19:42:24 -07:00
2023-12-08 11:59:45 +08:00