From nobody Mon Sep 29 20:16:03 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0ABFC00140 for ; Mon, 15 Aug 2022 23:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353315AbiHOXeV (ORCPT ); Mon, 15 Aug 2022 19:34:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347572AbiHOX1b (ORCPT ); Mon, 15 Aug 2022 19:27:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BFBFD5EBE; Mon, 15 Aug 2022 13:07:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 850C56068D; Mon, 15 Aug 2022 20:07:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EF45C433C1; Mon, 15 Aug 2022 20:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594036; bh=U9LEU0PNPrUcv/u8DbqdvwnTORGar03sf6rsAhm7UPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpfzIWaoaQo04O7Ze/Vga0iC50FoV5TgUZQkyH6dBSXI2y0ruQK/3ZU/YkQz255bL ucW5mJRkbfrf9y2HkcPihSbKZn0+pPPqP2wBdYPYCyvmxoc75IvjgELSuiMzQtooCJ 4gQuWeleJWWz2htbO8HlmsomloK07+WR4/mRAvc4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexey Khoroshilov , Corentin Labbe , Herbert Xu , Sasha Levin Subject: [PATCH 5.19 0365/1157] crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs() Date: Mon, 15 Aug 2022 19:55:21 +0200 Message-Id: <20220815180454.322392241@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alexey Khoroshilov [ Upstream commit d61a7b3decf7f0cf4121a7204303deefd2c7151b ] There is no i decrement in while (i >=3D 0) loop. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexey Khoroshilov Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV") Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- 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 >=3D 0) { dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE); memzero_explicit(sf->iv[i], ivsize); + i--; } return err; } --=20 2.35.1