]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: tegra - Set IV to NULL explicitly for AES ECB
authorAkhil R <akhilrajeev@nvidia.com>
Mon, 24 Feb 2025 09:16:08 +0000 (14:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:18 +0000 (14:39 +0200)
commit4a7e28e3523f2cb9a25a1a3dbafed04dbcafa464
tree187b7056d4946aa113192a81dbd88f1368cf3989
parent7d25febb0e033e4c09bb4026378d35104f612f59
crypto: tegra - Set IV to NULL explicitly for AES ECB

[ Upstream commit bde558220866e74f19450e16d9a2472b488dfedf ]

It may happen that the variable req->iv may have stale values or
zero sized buffer by default and may end up getting used during
encryption/decryption. This inturn may corrupt the results or break the
operation. Set the req->iv variable to NULL explicitly for algorithms
like AES-ECB where IV is not used.

Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/tegra/tegra-se-aes.c