Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2928341rwb; Mon, 15 Aug 2022 14:13:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5zZ0HGMY3MpF8ZsiWIIwJh2GyhBgUMouMImFdqThJzMvHA2/ZMRAGMmlnbqRntr8Otvxi2 X-Received: by 2002:a17:902:e74b:b0:171:4c36:a6a6 with SMTP id p11-20020a170902e74b00b001714c36a6a6mr19222764plf.116.1660598037633; Mon, 15 Aug 2022 14:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598037; cv=none; d=google.com; s=arc-20160816; b=LvPyotZ0XjAiuYXfzUBMHKcA0IloStqfiKPbdozXLimRkQK6q97voI2PkEkh9MgqhX /oFQTUfqWPocZXBOcw0Ca04mHepz78pd9S/Cdmv8LEG9yrVmJHM1AcWLOl08OJAX4dS2 ftHNhh6I07FpMLqRQmtffbe/pCdTmT7A3VjysALX7sI7uxbGpOmlmA4wo6wp9AOk1DHe XEvrT0MGYOX8nm6geSEmLkGDNBkdqLbRO36VNHICWW3V6zNP71+KTo6xHIHb6lD2NsZa 0QR0m+ksR5Fb5/q2jDMfqaQtLcglVFRUUD7s9tBjvH1xOeuA/fwoP1yFZG7KqDFQ+UNW w4Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zJPZCwMAH6G/deTObqGB0x7Ac8oBIBS01bgnAXEtQ1g=; b=RegIMFHNssuyQJL68be1oC7GvQctR5gO5tQBW6X2AgQhh0s5W5dfHyMtiDUNiNZ3kf p3/3/eXVX6+gGQjd2SWu+ayJitHSG4IhaqY1xhuu/DPOaiZLu+f218b4sSJGyf7ksCrn I6Fs+rncFDTYFPXmOp8EfTUaWj7Eelz3ROn8UW4aluQRvrzR6+khdk0xtlbB4B/LcFbV TWQ86Pgzb4QFxhyKfxqQ/5NDdu8K99ZfVCsEZsml6UKvavMHi3QenZdAocR2n83xBXT7 oqdf5qkYnDyTWj4GIyg8HWsoGLxEyRJhzqOWRxtHANfsKIBtEfje9r3NwUIGB9ONv4Zy itxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=daz7cqvf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a6545ce000000b004208b9d6243si13639017pgr.325.2022.08.15.14.13.45; Mon, 15 Aug 2022 14:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=daz7cqvf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233552AbiHOU5h (ORCPT + 99 others); Mon, 15 Aug 2022 16:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346931AbiHOU4C (ORCPT ); Mon, 15 Aug 2022 16:56:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE8E24F196; Mon, 15 Aug 2022 12:11:37 -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 ams.source.kernel.org (Postfix) with ESMTPS id 78886B810A3; Mon, 15 Aug 2022 19:11:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE827C433B5; Mon, 15 Aug 2022 19:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590695; bh=65ljVjHidvP03ijUNO/zjfxop07YULtw68E7rTTUr9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=daz7cqvfAvSkCXJ6qB38vPUZuKa4t0T54BL66TewtDr1IhCks1sQtnCe4B38IM9tG 4yp6oKfwHyVYE33GZv5cFB7a1qccPp25vZ+qbSadg5NS4Cnjm3RmoWAXZvMZLYYsTN UcwpV03+xDhPkP6CT35x90qReQ88/7o3TysNK/LQ= 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.18 0342/1095] crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs() Date: Mon, 15 Aug 2022 19:55:41 +0200 Message-Id: <20220815180443.950668835@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexey Khoroshilov [ Upstream commit d61a7b3decf7f0cf4121a7204303deefd2c7151b ] There is no i decrement in while (i >= 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 70e2e6e37389..3c46ad8c3a1c 100644 --- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c @@ -151,6 +151,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.35.1