[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqRfk2Jr++9WUk7h@Red>
Date: Sat, 11 Jun 2022 11:25:39 +0200
From: Corentin Labbe <clabbe.montjoie@...il.com>
To: Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: Re: [PATCH] crypto: sun8i-ss - fix infinite loop in
sun8i_ss_setup_ivs()
Le Fri, Jun 10, 2022 at 09:27:15PM +0300, Alexey Khoroshilov a écrit :
> There is no i decrement in while (i >= 0) loop.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV")
> ---
> drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
> index 5bb950182026..910d6751644c 100644
> --- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
> +++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
> @@ -170,6 +170,7 @@ static int sun8i_ss_setup_ivs(struct skcipher_request *areq)
> while (i >= 0) {
> dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE);
> memzero_explicit(sf->iv[i], ivsize);
> + i--;
> }
> return err;
> }
> --
> 2.7.4
>
Acked-by: Corentin Labbe <clabbe.montjoie@...il.com>
Tested-by: Corentin Labbe <clabbe.montjoie@...il.com>
Thanks
Powered by blists - more mailing lists