Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7030288rwr; Tue, 2 May 2023 08:34:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7V0XV8FjxsNY56FWGnKSOa0jw9W+9cD+mvMekpGt65vmV+scp3ClQmH9P99gYdki/SPMox X-Received: by 2002:a05:6a20:160e:b0:ee:f5a4:c072 with SMTP id l14-20020a056a20160e00b000eef5a4c072mr23189588pzj.46.1683041678242; Tue, 02 May 2023 08:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683041678; cv=none; d=google.com; s=arc-20160816; b=QKeBXu+G4YnOmorcAGNgGWfjH8Lrteo7FxIdyV+sCyAqDqhAP3oIoHesSMbF9Yo817 0GDzv2UAMx2YmKLLkRJtQmnM2pL6QRLJTakPf/P/sHkfs/cA42n+iKrnh1tI858oXidI mdHSAAHvNi/TK1rqVai33MPWM8NhZPF2rqO/rg2oBcXEEsitBD37ggJwBMixjd16AslG fIRXm1Whl7MWUcGfBZWbQKbj8XHGLPVhFve9SymHEmk5xLmntrQMEtqvF3WOtzDNaBIg C4Kl0hEPnwVMtMm3REPfvFe4skmZXpxspKC5Bzr8SJwGRmpBLqFe+fxYHXhITYUJVaV6 fL1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=Ls5pU+Q1QrF1XXFP/JhF4cJ0Yn/OuRoSoKyubuMhm5U=; b=GCfy8EjR5SFDxlDR/xdf0ONckEJbvNr35K8nMx8tfPpgqqLpE51rEPsYSlUwF0O7gq PmBEzz74WG9ihkmdJ8L/BAOeJJk3jdaUtDcaxYhd0neGGV5Y09LlKfn4QNm9h5SfVkxO QWl0LDzBm+SvCVWZ+yTgi9jOieSiPo5mlT9eurcC2czESwbTz8RfgQe6ePGYnfqvTGbH YZJVh/sAoLxjQlugXkL+wN5NRaD6NgwK3tgiefz6rgHSgrbBFfQJp6MYtgWC9NV+CCwB +embXC0TsXjTmnhW+zdCVDD/+zMQE3bdRMo5SxmMdj8EqhWJEppkFMHO9D6G1iK3+uxU Lx6g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v66-20020a632f45000000b0051b54441fc9si31026838pgv.253.2023.05.02.08.34.22; Tue, 02 May 2023 08:34:38 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234623AbjEBP2F (ORCPT + 99 others); Tue, 2 May 2023 11:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230332AbjEBP1s (ORCPT ); Tue, 2 May 2023 11:27:48 -0400 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A95E2D5A for ; Tue, 2 May 2023 08:27:46 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id e06c2cb6-e8fd-11ed-b3cf-005056bd6ce9; Tue, 02 May 2023 18:27:41 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Tue, 2 May 2023 18:27:40 +0300 To: Xiaolei Wang Cc: aisheng.dong@nxp.com, festevam@gmail.com, shawnguo@kernel.org, ping.bai@nxp.com, kernel@pengutronix.de, linus.walleij@linaro.org, peng.fan@nxp.com, shenwei.wang@nxp.com, bartosz.golaszewski@linaro.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl: freescale: Fix a memory out of bounds when num_configs is 1 Message-ID: References: <20230501144139.985767-1-xiaolei.wang@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230501144139.985767-1-xiaolei.wang@windriver.com> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, May 01, 2023 at 10:41:39PM +0800, Xiaolei Wang kirjoitti: > The config passed in by pad wakeup is 1, When num_configs is 1, > configs[1] should not be obtained, which will generate the > following memory out-of-bounds situation: > BUG: KASAN: stack out of bounds in imx_pinconf_set_scu+0x9c/0x160 > Read size 8 at address ffff8000104c7558 by task sh/664 > CPU: 3 PID: 664 Communication: sh Tainted: G WC 6.1.20 #1 > Hardware name: Freescale i.MX8QM MEK (DT) > Call trace: Please, read this https://kernel.org/doc/html/latest/process/submitting-patches.html#backtraces-in-commit-messages and update accordingly. -- With Best Regards, Andy Shevchenko