]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccree - don't attempt 0 len DMA mappings
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 17 Feb 2022 19:27:26 +0000 (21:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:35 +0000 (13:57 +0200)
commit478eb68501cb4c267257520fdd80a1a587b372e4
treebc562acc2523876eac10a6b27a27d3caae3c8beb
parent997eaae6df0f45d8ccf08054d933753560802a33
crypto: ccree - don't attempt 0 len DMA mappings

[ Upstream commit 1fb37b5692c915edcc2448a6b37255738c7c77e0 ]

Refuse to try mapping zero bytes as this may cause a fault
on some configurations / platforms and it seems the prev.
attempt is not enough and we need to be more explicit.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Fixes: ce0fc6db38de ("crypto: ccree - protect against empty or NULL
scatterlists")
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ccree/cc_buffer_mgr.c