Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1863087rwb; Fri, 19 Aug 2022 10:38:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR7HoYAXAuZ/qGCM+P3odzmqAr2yKrXr9+NxZL1zV9qVqKiZHyDyyeKiz2JHg+uhF4/py1SL X-Received: by 2002:a05:6a00:1688:b0:52b:cf1f:807a with SMTP id k8-20020a056a00168800b0052bcf1f807amr8713727pfc.21.1660930680237; Fri, 19 Aug 2022 10:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930680; cv=none; d=google.com; s=arc-20160816; b=GQWLHRk9Hm0poZevw2MLu/hidu1mliusxFYElxWg1uekS5gNahqz+QmeKJTeADiutF v6/4M79Z5iC05IV4TJ4x4KT6933eHgxtYPTyJzaKgYHYx4MMMa2/42XLg9MZRWeeaZxG lETo/ulRVVqbIr7GGeV13oRJNdhMzkK4dKAvsDmEBofcBQQd6NH5VyvdiQg29izDitev KDyc1Co5JMHAiS367KTvd8WbjJzLhmUnOK2ytCdSqR4xhBKgs9RrMwWS9//2DV4LW9en n/mfKAsCLFxrxvwZ76ZX+P+2VqjR2LUc3HcsNdpw72U0CEoAbILLsXvrgQJEuzoQ+7vf uxzg== 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=fXL75ZbVInUmaxNf+7fU8lO2RZMsvLF4jsS7tzavA/0=; b=b7/UYln74bm47BFIwHVkCmQ5dWFJnvpnOuhMjCj6URR9XejFi/6K1jP3qcynaxs86z t6GiDgN1zQI0f9u44jurzUMHunZyt9qDmr9EJOn0wrraGsSyPlCbvI2W54gyn7Ssbt29 kn7Q1BTBeZ4MC8WD7NCgecBd0WTfMg6tP80V40Z2IeIijAIWY6iiLENiXMpxzre2qIcG hBZlLR3htE6pTpSHRQgMDt2Jysd1ccx4gBMpJF620MTIbGstnu6h12A/TRxtq8HD/bwx DqgDdY7vDnEUu/wiEUQ+RdfJvokZozRRK70UrYcOzSEw+NBvlH7ZDOeVAM5CBp0C9dHN fdqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VMTveVmV; 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 nn17-20020a17090b38d100b001fad91f24dbsi987340pjb.149.2022.08.19.10.37.49; Fri, 19 Aug 2022 10:38:00 -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=VMTveVmV; 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 S1351364AbiHSQH2 (ORCPT + 99 others); Fri, 19 Aug 2022 12:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350704AbiHSQCh (ORCPT ); Fri, 19 Aug 2022 12:02:37 -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 B6BB810097C; Fri, 19 Aug 2022 08:54:26 -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 5BF1CB8280C; Fri, 19 Aug 2022 15:54:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4896C433C1; Fri, 19 Aug 2022 15:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924463; bh=la5E+kuBAMSt4oLG9TPx/PFw2+rOiN5mmjXwovuGkUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VMTveVmVbHqsnMD9f3wW+ah5Kne/2lQq4bQGfbQ5/4qgqU48P5GTQsdquKk2HfsUx rh+aULLmZYk8osOzrB4DV0eozxV+ICAbPzJmCjDC+5dijX7vx0mwC9SCQQ3b/q+7cP y8V5WLDt1ns4zAmPiJNVJeom5EwhEXT5+ITQABr0= 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.10 177/545] crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs() Date: Fri, 19 Aug 2022 17:39:07 +0200 Message-Id: <20220819153837.271819174@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 7b3be3dc2210..d0954993e2e3 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