linux/drivers/pmdomain
Wentao Liang ec1fcddb31 pmdomain: mediatek: fix use-after-free in scpsys_get_bus_protection_legacy()
In scpsys_get_bus_protection_legacy(), of_find_node_with_property()
returns a device node with its reference count incremented. The function
then calls of_node_put(node) before checking whether
syscon_regmap_lookup_by_phandle() returns an error. If an error occurs,
dev_err_probe() dereferences the node pointer to print diagnostic
information, but the node memory may have already been freed due to the
earlier of_node_put(), leading to a use-after-free vulnerability.

Fix this by moving the of_node_put() call after the error check, ensuring
the node is still valid when accessed in the error path.

Fixes: c29345fa5f ("pmdomain: mediatek: Refactor bus protection regmaps retrieval")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-27 14:53:30 +02:00
..
actions pmdomain: Use device_get_match_data() 2023-10-17 11:45:11 +02:00
amlogic pmdomain: amlogic: Add support for S6 S7 S7D power domains controller 2025-09-04 12:25:36 +02:00
apple pmdomain: apple: Add "apple,t8103-pmgr-pwrstate" 2025-09-18 21:30:56 +02:00
arm pmdomain: arm: Add print after a successful probe for SCMI power domains 2026-04-01 13:12:11 +02:00
bcm pmdomain: bcm: bcm2835-power: Replace open-coded polling with readl_poll_timeout_atomic() 2026-04-01 13:12:11 +02:00
imx pmdomain: Merge branch fixes into next 2026-04-01 13:34:40 +02:00
marvell pmdomain: add audio power island for Marvell PXA1908 SoC 2026-04-01 13:07:31 +02:00
mediatek pmdomain: mediatek: fix use-after-free in scpsys_get_bus_protection_legacy() 2026-04-27 14:53:30 +02:00
qcom pmdomain: qcom: rpmhpd: Add power domains for Hawi SoC 2026-04-08 12:01:37 +02:00
renesas Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rockchip pmdomain: rockchip: quiet regulator error on -EPROBE_DEFER 2026-04-01 13:12:11 +02:00
samsung pmdomain: samsung: Rework legacy splash-screen handover workaround 2025-11-04 17:16:05 +01:00
st Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
starfive pmdomain: starfive: Update prefixes for AON power domain 2023-10-04 23:41:57 +02:00
sunxi pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver 2026-04-01 13:12:11 +02:00
tegra Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
thead pmdomain: thead: Fix error pointer vs NULL bug in th1520_pd_reboot_init() 2025-09-26 14:50:20 +02:00
ti pmdomain: ti: omap_prm: Fix a reference leak on device node 2026-04-01 13:07:31 +02:00
xilinx firmware/pmdomain: xilinx: Move ->sync_state() support to firmware driver 2025-07-09 13:29:25 +02:00
core.c pmdomain: core: Fix detach procedure for virtual devices in genpd 2026-04-27 14:36:17 +02:00
governor.c pmdomain core: 2025-12-04 13:50:39 -08:00
Kconfig pmdomain: marvell: Add PXA1908 power domains 2025-09-17 16:13:19 +02:00
Makefile pmdomain: marvell: Add PXA1908 power domains 2025-09-17 16:13:19 +02:00