Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2927547rwb; Mon, 15 Aug 2022 14:13:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7HF57HYOLOkej705Jz0jKM84V5EmTa7qoXC4X4NfrhEdFY18nNV60iFRWuYniE2zN6uT8y X-Received: by 2002:a05:6402:3552:b0:43d:a57d:22e9 with SMTP id f18-20020a056402355200b0043da57d22e9mr16034162edd.119.1660597980971; Mon, 15 Aug 2022 14:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597980; cv=none; d=google.com; s=arc-20160816; b=LvjTb8kyCOx0oj2NYlizCw+N5x90019eJ+XUj7lQTuCH+Z6CRip8Znn8vFQG+7nzVS Ws8JnR+3DJheJHrNIXej2FUJNfBrVp65dr1gZqtSJb0r3zSFOn9jEl+8aWnZ7Weqy992 O/oPlroQDFeQIqSc9P9qnCkNu0da+UT6RH3qpjstT0XdnMWKGKK7c6RW7rbZSXv11YLf XAvkNELeGxrLG2bLbWCrN6XOl0tt1L6HWwHuB1c3ic1TlSbmffXgSJknHnWtIu3XqHEM DQsqMJGXBT5+z8iXJMRQZZ2uz8FY3lxPD4cgCIUI+Jji+abN+09VNueIATCMtsqpWhIU 2aqQ== 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=eeM7J2xhB/3rVvxTuVb9xXBiUTrqE5zErj33ZhpvucsmwcRRl+e7r0MWbrqKBkf9oN JhbngE9Fug2x09TFCytM3XsAs7vuD0I/iT5ADzAJhuxmTNMy6/YDR7qtOyx6Bs+OPEdW 0vfXHK9bfr+jacTCj6+GJxTMRbhNdDhS2jRCl8DNRqxlzN8JVC62FcN1ubD5f2uDjcsp YxfAPho4zR/ci9pi1a8zCELnB7rBDcPQ4ik4j99MWivX/vyLMDWzN1VXqNUu1vR2btY7 KT+FtVl33oWfPwpPeR3A3xK91UoIvgf4Q+5KKsKn1+upIjrC0fU+NTxvBxzUgfyngO08 NIew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="k/K1iejG"; 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 ne10-20020a1709077b8a00b00726d5d59195si8991513ejc.674.2022.08.15.14.12.34; Mon, 15 Aug 2022 14:13: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="k/K1iejG"; 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 S243499AbiHOSs0 (ORCPT + 99 others); Mon, 15 Aug 2022 14:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242986AbiHOSnK (ORCPT ); Mon, 15 Aug 2022 14:43:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 817402A275; Mon, 15 Aug 2022 11:26:45 -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 2B58DB8107B; Mon, 15 Aug 2022 18:26:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44E6BC433C1; Mon, 15 Aug 2022 18:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588002; bh=65ljVjHidvP03ijUNO/zjfxop07YULtw68E7rTTUr9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k/K1iejG9AkT0HSWr3esAZY1yuakOqbNhwxyeLnE6VgBDdGva1u9NGv3OGRKAxxBS z9WVtVyfJfWsE0G2FWPYOSijEz9Vx2zhzUt4I66E19IUP1Qr2mp5rgl6+A+60NBrBm JYJ8sKWPA+NluOr7f/E/rHP1mo0KM3rBGR/7wCWg= 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.15 265/779] crypto: sun8i-ss - fix infinite loop in sun8i_ss_setup_ivs() Date: Mon, 15 Aug 2022 19:58:29 +0200 Message-Id: <20220815180348.698511625@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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