Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp388206rwp; Wed, 12 Jul 2023 15:13:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlEez62Bl+VRg76lBpAdVCtFGR0b/VEBa8Rg0I5iAjh1zc7JMGtoTS1pyd4nTI0VlBI724Aq X-Received: by 2002:a17:906:73ce:b0:993:d88e:41ed with SMTP id n14-20020a17090673ce00b00993d88e41edmr17412711ejl.3.1689199983245; Wed, 12 Jul 2023 15:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689199983; cv=none; d=google.com; s=arc-20160816; b=ml3+mPo2Ayzk0S8ejwads30xsi3RyoEQZyInkiLCpcchHEER8/iTXeenWPZ7XtohPo sFj7uBHuwPJlX59UAWrqVeDYjAuJSY2qaBb35ezTO1AstZf8b8dbbEcfXeEmCa6clqF6 7uUtL9TCbtmmRyEFgMoRjgU3pYRsz6k4EU+7y6R18WsfgbAxnm4e81RvN3Y4MTFrF9tF RF4BLjLCT44T1tWTBaDEOMNOlP2u4umU/V7j5pHrJXEwxODnVdT+H2A/Ryt0TRw84NZD BWXhhQse1c34P0E1iGmkBT9vK9yL02aR7BJ9PvWaIlvGwREFKyxt0XmofROrBkFLDylZ JNnA== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=qJZ8+BEMfFKVjkQ/x5NszfoZ0HUNTrn1LgCiuC+ZaIQ=; fh=e+weeNJJOJkzDipwKLH3ORStJ5slH/JKgax73C+DZOc=; b=eCYkRL1k4GghHdpiexrY4nnpv3Ia3Y60RLfz7pPXhOCmAkDmUT1wZ4qhL5t2rIc+sP /b2kly/gLm3h/yX0ZkY8WvhxLhSsVfz7Ukn6zcd8ryoI3vdRm/Ao83y55/ytrm58ZlHJ DxSVNosBofEaPSZQU/b7/YV+t6iq9NUj7Z5e3+QUbJZl82mN0go46Xr5ENGETof+Ky1G LEAJG3koidCJw/uIA5WYdC8sFzI96cyCl4GBphvasZFvRixS/PR5Fv6dkLKv0fkkhufl MI3v4nMbj8/Bif+toxh+pyYTwC/FkYlWa4tqxWJ53KNxKYSPWRJUpOBtL3geC+Ud8gKQ vUVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NbdF1saE; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020a17090682d400b009823e4ca32csi5007226ejy.407.2023.07.12.15.12.36; Wed, 12 Jul 2023 15:13:03 -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=@kernel.org header.s=k20201202 header.b=NbdF1saE; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbjGLWGd (ORCPT + 99 others); Wed, 12 Jul 2023 18:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbjGLWGb (ORCPT ); Wed, 12 Jul 2023 18:06:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1006CB0; Wed, 12 Jul 2023 15:06:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 82F1F6195D; Wed, 12 Jul 2023 22:06:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FD4AC433C8; Wed, 12 Jul 2023 22:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689199589; bh=3LvTkwHC1aXilpylTHfuT9Dd/jYCCcQvi0STTcj3u4Y=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=NbdF1saEXJmhy492uWVuPKrKChNGckdheEAFhSTAsQzFx1+WrcGPDEvfLb3PjcMuz X4kYsdx3USScMgN6LmCQgu2Bnkb7ZnfRxG7A1E49+NwBBTCW6NhmDKlH3JQ1h33/pC 3zIVyQiWD7mntC/nSyTJrU/0KA4wFcyRvm5sHb1OhnsbIRB2Lb1HRXbQL2NuAl0a1x vKGGW4RBiI7ZCYmfuFbIurvN+L11MyQ/PIIDGoUS6BNWWaBhbRGsdVh3gA1DyRBK4V TA/YKNfMqvMKkqZvagtdmTGRjC10W3JoN389G48dPYkJn034zDrp3sgVyKMabGVQlr 7xaJAOPh15G1A== From: Mark Brown To: Russell King , Greg Kroah-Hartman , "Rafael J. Wysocki" , "Russell King (Oracle)" , Saravana Kannan , Tomeu Vizoso , Ulf Hansson , Marek Szyprowski , Aidan MacDonald , "Isaac J. Manjarres" Cc: Amit Pundir , John Stultz , stable@vger.kernel.org, Catalin Marinas , kernel-team@android.com, Russell King , linux-kernel@vger.kernel.org In-Reply-To: <20230711193059.2480971-1-isaacmanjarres@google.com> References: <20230711193059.2480971-1-isaacmanjarres@google.com> Subject: Re: [PATCH v1] regmap-irq: Fix out-of-bounds access when allocating config buffers Message-Id: <168919958636.823990.7053808708980391423.b4-ty@kernel.org> Date: Wed, 12 Jul 2023 23:06:26 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13-dev-099c9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 On Tue, 11 Jul 2023 12:30:58 -0700, Isaac J. Manjarres wrote: > When allocating the 2D array for handling IRQ type registers in > regmap_add_irq_chip_fwnode(), the intent is to allocate a matrix > with num_config_bases rows and num_config_regs columns. > > This is currently handled by allocating a buffer to hold a pointer for > each row (i.e. num_config_bases). After that, the logic attempts to > allocate the memory required to hold the register configuration for > each row. However, instead of doing this allocation for each row > (i.e. num_config_bases allocations), the logic erroneously does this > allocation num_config_regs number of times. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next Thanks! [1/1] regmap-irq: Fix out-of-bounds access when allocating config buffers commit: 963b54df82b6d6206d7def273390bf3f7af558e1 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark