All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: cy_huang <u0084500@gmail.com>
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 <cy_huang@richtek.com>
Subject: Re: [PATCH v2] regulator: core: Use different devices for resource allocation and DT lookup
Date: Thu, 08 Dec 2022 14:09:06 +0000	[thread overview]
Message-ID: <167050854689.183709.17486516496456151482.b4-ty@kernel.org> (raw)
In-Reply-To: <1670311341-32664-1-git-send-email-u0084500@gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: cy_huang <u0084500@gmail.com>
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 <cy_huang@richtek.com>
Subject: Re: [PATCH v2] regulator: core: Use different devices for resource allocation and DT lookup
Date: Thu, 08 Dec 2022 14:09:06 +0000	[thread overview]
Message-ID: <167050854689.183709.17486516496456151482.b4-ty@kernel.org> (raw)
In-Reply-To: <1670311341-32664-1-git-send-email-u0084500@gmail.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-08 14:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  7:22 [PATCH v2] regulator: core: Use different devices for resource allocation and DT lookup cy_huang
2022-12-06  7:22 ` cy_huang
2022-12-08 14:09 ` Mark Brown [this message]
2022-12-08 14:09   ` Mark Brown
     [not found] ` <CGME20221213113259eucas1p1c224898772bc5e59de90c1aa65a34de0@eucas1p1.samsung.com>
2022-12-13 11:32   ` Marek Szyprowski
2022-12-13 11:32     ` Marek Szyprowski
2022-12-13 14:19     ` ChiYuan Huang
2022-12-13 14:19       ` ChiYuan Huang
2022-12-13 14:29       ` Marek Szyprowski
2022-12-13 14:29         ` Marek Szyprowski
2022-12-13 16:32         ` Mark Brown
2022-12-13 16:32           ` Mark Brown
2022-12-13 22:23           ` Marek Szyprowski
2022-12-13 22:23             ` Marek Szyprowski
2022-12-14 13:32             ` Mark Brown
2022-12-14 13:32               ` Mark Brown
2022-12-14  0:35         ` ChiYuan Huang
2022-12-14  0:35           ` ChiYuan Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167050854689.183709.17486516496456151482.b4-ty@kernel.org \
    --to=broonie@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=chiaen_wu@richtek.com \
    --cc=cy_huang@richtek.com \
    --cc=djrscally@gmail.com \
    --cc=gene_chen@richtek.com \
    --cc=hdegoede@redhat.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=markgross@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=u0084500@gmail.com \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.