Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1092361rwb; Thu, 8 Dec 2022 06:42:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5mC99B9OlsfcTBYrb+A29+YgriOv6wBT7EkAquAfewYZgxwMpoMYbwaIqjLiKCfip8RScb X-Received: by 2002:a05:6402:1246:b0:46d:a8f2:93e8 with SMTP id l6-20020a056402124600b0046da8f293e8mr1063596edw.423.1670510567018; Thu, 08 Dec 2022 06:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670510567; cv=none; d=google.com; s=arc-20160816; b=Wf88FlISWevDLiFW1/GXBmaSej4kNb9a0lCZ1rc5gjSI15EHzap1SrE8fX/U69qFw4 CKOKXC892b5o8UW5rxo3hcPsiFrbrqhmuoecFxhOEGoY9G4AI0cC09n6/v/AoqgNL8jr 8YJLm/sAruB2DmJVdv3c01c7eFSVzFls/CxGx0iZz7O4cOQRzlpwiuIYPFWU57dDZ4TW vTGuRGT3Vl4mkr6tgqxyCUctA5g0vFWmgbIuX+2C4NJvFY43hWXK2ae+PUaTE8dbte0H Sap07A218QGWji5THYPZ12HxbV4gT5lqnk0VP8h+SKXieAhYmD7jtI0065jxF8H6Fzel R6+Q== 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=8R3+3jbqg9kzh0JKRtjiqb5VzgNv+Fn//pGfmFJG7j0=; b=NzPfT1JUXEIj/DR7fHC/scZSPlgBqgAUgXS674Tv3IuLymxOJ/mzLspIW9wQF6XtGZ Cnf6wa9xYUJAbJTt5Gz4BH8zJulrg3/Xk+cRCo1LJ3u0FZbbAXC9eSxzgkRYOu7qAPqZ jOhdHKTpXKl3BvEKgnE15MQUcuu+MSDuM6NAjC691rDC7s+VQ6Eq2VpmQ0E5WWROHFzy 3FrXIRwTjOdRy6CXy7JC4pcclOvy1so1gzFjSyL43Y0M65kbsSlpMvpE1D5czUFxBdBG T7R+dNmvDV6E49u0qIt7kiFVxteC1Ep8syf+bLGNzGyoa93qIZ5jWrD0czK+6gGu8JaB Kqjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oJlNQ4XN; 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 z15-20020a17090655cf00b007ae1052555dsi14396473ejp.436.2022.12.08.06.42.28; Thu, 08 Dec 2022 06:42:46 -0800 (PST) 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=oJlNQ4XN; 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 S229668AbiLHOJO (ORCPT + 73 others); Thu, 8 Dec 2022 09:09:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiLHOJL (ORCPT ); Thu, 8 Dec 2022 09:09:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD58314; Thu, 8 Dec 2022 06:09:10 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 8E11661F4C; Thu, 8 Dec 2022 14:09:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A8CAC433C1; Thu, 8 Dec 2022 14:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670508550; bh=TjT5PUNaNbGlUXOnw89bI4x13NlHeMqj/JZXmYi1AAk=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=oJlNQ4XNnq456CSrH1v2scCD1AZykmpEWYi9ZpCSEBMCDccShg8hkBW1oplSPKF4m 2EFXgqonaDWDJSv9HKGQ92njZyKK2284lOPCYn1oXPWWRtwQGtrWyw9ugyczYW5dlq 5+DkWKiAmUL14HIDtTYj+wmGd8txWjwGspyHO+eX5vJBKG1BC1eIvwHauFfn1hQc/A vHdyuEC9N4jglHWI8/SmZLaAtyLQ2AoLUx9w97AFXCP7Y+zIKT853dmiHxHJx/XYmV ZFSz4PAs5cem8w0BkR7wWJUnEIqEmsSOLnUxNXRFOulRH/41TxMQli5XGNUplNyQ1B BqxPTpelfGsww== From: Mark Brown To: cy_huang Cc: djrscally@gmail.com, hdegoede@redhat.com, markgross@kernel.org, lgirdwood@gmail.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, yangyingliang@huawei.com, gene_chen@richtek.com, chiaen_wu@richtek.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ChiYuan Huang In-Reply-To: <1670311341-32664-1-git-send-email-u0084500@gmail.com> References: <1670311341-32664-1-git-send-email-u0084500@gmail.com> Subject: Re: [PATCH v2] regulator: core: Use different devices for resource allocation and DT lookup Message-Id: <167050854689.183709.17486516496456151482.b4-ty@kernel.org> Date: Thu, 08 Dec 2022 14:09:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.11.0-dev-76d0b 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 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, 06 Dec 2022 15:22:21 +0800, cy_huang wrote: > Following by the below discussion, there's the potential UAF issue > between regulator and mfd. > https://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/ > > From the analysis of Yingliang > > CPU A |CPU B > mt6370_probe() | > devm_mfd_add_devices() | > |mt6370_regulator_probe() > | regulator_register() > | //allocate init_data and add it to devres > | regulator_of_get_init_data() > i2c_unregister_device() | > device_del() | > devres_release_all() | > // init_data is freed | > release_nodes() | > | // using init_data causes UAF > | regulator_register() > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [1/1] regulator: core: Use different devices for resource allocation and DT lookup commit: 8f3cbcd6b440032ebc7f7d48a1689dcc70a4eb98 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