Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp262028rwr; Thu, 4 May 2023 18:43:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Vz8kvaeWckThp38r52L4kT9nfOwKohpQ4+ZVak4YZjJtC3nFmmc7GbLeA3Qu9CmS7pas6 X-Received: by 2002:a17:902:6b04:b0:1a9:86ca:38ce with SMTP id o4-20020a1709026b0400b001a986ca38cemr4806469plk.4.1683251026853; Thu, 04 May 2023 18:43:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683251026; cv=pass; d=google.com; s=arc-20160816; b=y6rElB7RjBEo719DVYQ57JBHp7nu5nlS72kH5uf6AJ7dxrrcgyVOdaaULX7KJNB97o jNk9+/pxmg4SaGdbiAiylYghvcSddq1n6IoJHpMQixbuhdhDXitcTGdru1KjMZ44Jpwc klZMJRF/dhfxH2xrjeUy/kqBHDs5aUnL3ST7FvpMig7E+oePCOk3zro0LAhfB3QYtvMC CUQ7YcgL6dTZ8lVBebUIXe5QAOR8snMd8gxxR7MGiiKqV/KagDnxm+uL/iV41vYemteL E+16Nyafs6tvhV/q7zydhhelJcowouRC9yFSRgMwloKt3726EfeQu5ygm5lGk5hmioGt yZVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=xbysqy1RMqxJqVYIq773OBQ0XCvAucxKsvS+tNM6rYA=; b=Gbj2btoR5rpdXyX6lOZcfY7G8NZXnzr09KWjoOEAFfu1CQ81T5bc8Z3xlPp9ktts1M ri4PhH6jDlAzReB2PU3PVfb8SdQSaGVDxOGMUeMCAxwxQWbXeJl0EGeenzXARj9fZ5pL ekuCWqyetDKHcE8GoAYt4AWX0q00xxF12Ayx+UIYPpYrljTMkd6pV9VhNQ+TjFLFXQuW AGtwNYRar7m/SJpAeB7AtLhwpUmNwrUsqT0vxVxahrrlHuGFkiOhxsS5m3br9ky0QR8N fEx281xOPOdI9/hOkWzs3MLsbf3eU2AC7u3XGU5HeLo/ZFfyNBi3t9QVf2Oi2Yydiaiu Lcng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=LYFr+aVN; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg8-20020a1709028e8800b001ab23cb930bsi416016plb.417.2023.05.04.18.43.34; Thu, 04 May 2023 18:43:46 -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=@nxp.com header.s=selector2 header.b=LYFr+aVN; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229736AbjEEAxl (ORCPT + 99 others); Thu, 4 May 2023 20:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjEEAxj (ORCPT ); Thu, 4 May 2023 20:53:39 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2074.outbound.protection.outlook.com [40.107.6.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC3DE11625; Thu, 4 May 2023 17:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BBjVwp1193ahbuGuYu+wNd4ERFAfk7JWY4k8n652zg3rHy2EDYToABYyYWrdw7WHMckrJcudmTeglWngOrqeSNrz018RXYzerOP3+zAvZfjdXQFcYFqSeKrvW13kd+onYA42dYfGwgV2l8+3IVM6LldbrbPt6toSMNIo+SH9VDQFsNM5vgOCVHOBNI4OW9iDXLPkLucjyrmExj1D/xKjnJc/NGMgd/wu5lTGWKUVFzcX/Dh3Fvwm6liJDoigSzd+3/GqdiS+n3yKHKKTEKnWKeoG7k2y8UGeoDjwoMRpoVB9irdYdCsPcZm1Uj0iGYTPdF/79RNjc2usZ5541W1Cbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xbysqy1RMqxJqVYIq773OBQ0XCvAucxKsvS+tNM6rYA=; b=Kn5PFrKq559DBlNpnP6iI46Hb+8cpVb72R36pPMrVnO3AP5NjTSSAfgDBnYPOIS+wM4WeysfXcPY5fxbRjiVgc2MaJdeSV44Gt6Gwbs0v8kqH3dFRQ1iQHxBWL6f6ukegedMguqoQ65tIXPqAq0PpsYAqlJCAnP3y6madWXNoz997X5BF4PhAiapn8yaotx1sun5PEzTHchH4/1V2iohXEHQwo3nS5m/xrhRwEf2X3ABaTBlRuS2E4+ut4vwj71Sz5OZxGScqGvReRVrbVLo/HEBldkxPzvHgbQ4Lxiij2Ka95P6ZefpdA08SRpsyFPixjKBkEQgtx6RziIxpqBubw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xbysqy1RMqxJqVYIq773OBQ0XCvAucxKsvS+tNM6rYA=; b=LYFr+aVNUQqEYQgHM5Gem/Uv9ZLmo3wb7MQMzft7e6hKcY2e/B2wh0bOJHEQu6hE1jEPnvTnv73ethxdEuG8llH70QyN8lEKGgnzRLW86EQ8EUHebi+CCwXH2gIAFTbBCN7wxrIvYyxDg+JG5UHYJxq17fj69C/0CFTRa4/EZWg= Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PR3PR04MB7420.eurprd04.prod.outlook.com (2603:10a6:102:93::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 00:53:35 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::b999:f2c6:a8cc:7b4]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::b999:f2c6:a8cc:7b4%4]) with mapi id 15.20.6363.027; Fri, 5 May 2023 00:53:35 +0000 From: Peng Fan To: Xiaolei Wang , Aisheng Dong , "festevam@gmail.com" , "shawnguo@kernel.org" , Jacky Bai , "kernel@pengutronix.de" , "linus.walleij@linaro.org" , Shenwei Wang , "bartosz.golaszewski@linaro.org" CC: "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [v4][PATCH] pinctrl: freescale: Fix a memory out of bounds when num_configs is 1 Thread-Topic: [v4][PATCH] pinctrl: freescale: Fix a memory out of bounds when num_configs is 1 Thread-Index: AQHZfuF74rzFVHCVREWkPCOsozeZb69K2iMQ Date: Fri, 5 May 2023 00:53:35 +0000 Message-ID: References: <20230504233736.3766296-1-xiaolei.wang@windriver.com> In-Reply-To: <20230504233736.3766296-1-xiaolei.wang@windriver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU0PR04MB9417:EE_|PR3PR04MB7420:EE_ x-ms-office365-filtering-correlation-id: f82474f5-0e40-4c8f-f273-08db4d0327f7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cPTKk3jQHulqdn/sotNVrmPxE7JauissGtD53+7wmr+u+qNipU3jBUQOB6JuydYynmDA1xEWiWffOWQOse/YqWdV3wajPFGibr4iM8lDAuIf525mjdCKnKoVmYaixJyJLn0RkW9gJLhmyQa3+uMLjJSYiGDz57ql2iMjtyg0kOGz/+5P65CMWy6CC88mpvJx2ulmp4i6LgzZ8shuDvmWJBCOifMt1D/xB9YYdCtKgJJcBHGwORnVdcI/XzbRf14mA+dr6/935akcs4AZz5qhn77D40gu6G3N080KfUuFKGtFckUDkbUHzzExAWYwTcC/RFnfgVeiLnq3xaZSMgoHwUVuJVZoSmh9HSVhOXGUTPWqtBeOGraUp1J6s71xQuZ5ox6f7vIhFqWVJNPeLVVRR+dZq81dvMOlBWq0SlExZQmF5L4rl0PdxfyDuYSX2WCYE4nXHE98RCm5HVnVFMrP11gDICMfN7h2V1Im0aVs8OMyPAl+eeVnfhvz+syrmr/88oFcgjwzKSv82ouiVafSgHgf/K/O63L9EmmOXXrB4M6ogIDpemekGrkh3Wqk8TPZQr5ewx+J0ZYM5kKbJlGcAnSciHmhZRVvI7dGUJ3ziAs= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(136003)(376002)(39860400002)(366004)(451199021)(33656002)(86362001)(54906003)(110136005)(316002)(66946007)(66556008)(66476007)(66446008)(64756008)(4326008)(76116006)(7696005)(71200400001)(478600001)(41300700001)(55016003)(5660300002)(52536014)(8676002)(8936002)(4744005)(2906002)(44832011)(38070700005)(38100700002)(122000001)(186003)(6506007)(9686003)(83380400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uS0zfVbeYChRJDqBBBKziK7UUDrzVfmpmLJ4rzlWwxqJlMDmxoOPk9EE6PRY?= =?us-ascii?Q?3y1kU+qRVkWL+AZ0l94vquxIJFzTOcwM43l7mcJ72gbfnIroyZj8i51W5hwI?= =?us-ascii?Q?umSFQXg1ZMMeV3CRLG2Iwf96sQ2V6WAgi6FxtYHQLtn1LyOidINp+YDp/yP3?= =?us-ascii?Q?JH98i+PUMLc5QSHmb2LxBnW5ZSsrjv+C7NKO0vIg1gxWRacBFspSX8gp9K3T?= =?us-ascii?Q?/KcjxIyp4CGWEQQCMTKIJ7Sv6jpZ7aMqIqcRNmlLuRcRTaHMgV3fB0IWNTTB?= =?us-ascii?Q?YPczTX31k9IKHUq+u21RWIBsV416GrADlHKpSvBdRqlpEyoT2+qXLQA4CzIZ?= =?us-ascii?Q?HGsIdlJu3wsMXSsZXV5YJ0MY6mxwl6JK3dJpORLaLE1b7uIT3P//SsRBOsL7?= =?us-ascii?Q?5zcpMn36IKp9EF8KLqJDz12HH0UPLsGNrP5e34DljLieT2BxhjZNQr8mOTpJ?= =?us-ascii?Q?jGCuZ/956htY5C7mtDu/HZ+vJMwYFZoshwdYmWXybL++0Y0MO01WTxUCChbf?= =?us-ascii?Q?guqqwskQhaBDOzADkpCgXMtocLIG/XI+38drYP5p0uqR5wC5EfsZ4K3jT5ul?= =?us-ascii?Q?iZiJITnDxQnTN38cCxjb2xTzbkPvayoAhDE8lBr3MryNH71CIgoInYPdL6O5?= =?us-ascii?Q?oQ4kH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ztmJMUg?= =?us-ascii?Q?=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f82474f5-0e40-4c8f-f273-08db4d0327f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2023 00:53:35.3714 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZyGSBLASIP00p6WMBkIeOQJfn35q750Y2xILLb6CyyZNNKQuK8WctkKA0rm6nxvvIR8f3Rg2o7GgCtrR6uhhwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7420 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 > Subject: [v4][PATCH] pinctrl: freescale: Fix a memory out of bounds when > num_configs is 1 >=20 > The config passed in by pad wakeup is 1, when num_configs is 1, > Configuration [1] should not be fetched, which will be detected by KASAN = as > a memory out of bounds condition. Modify to get configs[1] when > num_configs is 2. >=20 > Fixes: f60c9eac54af ("gpio: mxc: enable pad wakeup on i.MX8x platforms") > Signed-off-by: Xiaolei Wang Reviewed-by: Peng Fan