2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/clk
Xiaolei Wang aacc875a44
clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data
When num_parents is 4, __clk_register() occurs an out-of-bounds
when accessing parent_names member. Use ARRAY_SIZE() instead of
hardcode number here.

 BUG: KASAN: global-out-of-bounds in __clk_register+0x1844/0x20d8
 Read of size 8 at addr ffff800086988e78 by task kworker/u24:3/59
  Hardware name: NXP i.MX95 19X19 board (DT)
  Workqueue: events_unbound deferred_probe_work_func
  Call trace:
    dump_backtrace+0x94/0xec
    show_stack+0x18/0x24
    dump_stack_lvl+0x8c/0xcc
    print_report+0x398/0x5fc
    kasan_report+0xd4/0x114
    __asan_report_load8_noabort+0x20/0x2c
    __clk_register+0x1844/0x20d8
    clk_hw_register+0x44/0x110
    __clk_hw_register_mux+0x284/0x3a8
    imx95_bc_probe+0x4f4/0xa70

Fixes: 5224b18946 ("clk: imx: add i.MX95 BLK CTL clk driver")
Cc: stable@vger.kernel.org
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Link: https://lore.kernel.org/r/20250619062108.2016511-1-xiaolei.wang@windriver.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2025-06-19 17:32:40 -07:00
..
actions clk: actions: Convert to devm_platform_ioremap_resource() 2023-08-22 14:28:03 -07:00
analogbits clk: analogbits: Fix incorrect calculation of vco rate delta 2025-01-16 13:43:49 -08:00
at91 clk: at91: sama7d65: add sama7d65 pmc driver 2024-12-29 14:17:55 +02:00
axis
axs10x clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
baikal-t1 clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
bcm clk: bcm: rpi: Add NULL check in raspberrypi_clk_register() 2025-05-06 14:41:55 -07:00
berlin clk: berlin: div: Add a determine_rate hook 2023-06-08 18:39:26 -07:00
davinci clk: davinci: Use of_get_available_child_by_name() 2025-05-06 14:46:00 -07:00
hisilicon clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
imgtec clk: imgtec: use %pe for better readability of errors while printing 2025-03-04 12:15:25 -08:00
imx clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data 2025-06-19 17:32:40 -07:00
ingenic clk: ingenic: tcu: Switch to determine_rate 2023-06-08 18:39:34 -07:00
keystone clk: keystone: syscon-clk: Do not use syscon helper to build regmap 2025-03-04 11:49:53 -08:00
mediatek clk: mediatek: Add SMI LARBs reset for MT8188 2025-02-27 14:17:01 -08:00
meson clk: meson: Do not enable by default during compile testing 2025-05-15 14:44:50 +02:00
microchip module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
mmp clk: mmp: Fix NULL vs IS_ERR() check 2025-03-07 11:05:01 -08:00
mstar
mvebu clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
mxs clk: mxs: Use clamp() in clk_ref_round_rate() and clk_ref_set_rate() 2024-07-10 13:08:59 -07:00
nuvoton clk: nuvoton: Convert to devm_platform_ioremap_resource() 2023-08-22 14:52:11 -07:00
nxp clk: lpc32xx: Constify struct regmap_config 2024-07-08 13:32:47 -07:00
pistachio
pxa ARM: SoC changes for 6.5 2023-06-29 15:28:33 -07:00
qcom clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks 2025-05-17 19:28:40 -05:00
ralink clk: ralink: mtmips: remove duplicated 'xtal' clock for Ralink SoC RT3883 2025-01-13 13:35:38 -08:00
renesas clk: renesas: r9a09g047: Add XSPI clock/reset 2025-05-08 20:17:55 +02:00
rockchip I've recently moved computers (among other things) so I'm sending this from a 2025-05-30 09:15:40 -07:00
samsung clk: samsung: correct clock summary for hsi1 block 2025-05-12 08:30:06 +02:00
sifive This a large collection of clk driver updates and a handful of new SoC 2024-07-19 12:16:28 -07:00
socfpga clk: socfpga: stratix10: Optimize local variables 2025-04-24 17:38:07 -05:00
sophgo clk: sophgo: Add clock controller support for SG2044 SoC 2025-05-07 08:00:09 +08:00
spacemit clk: spacemit: k1: Add TWSI8 bus and function clocks 2025-04-17 03:22:56 +08:00
spear clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
sprd clk: sprd: add missing MODULE_DESCRIPTION() macro 2024-06-03 15:43:16 -07:00
st clk: st: flexgen: Switch to determine_rate 2023-06-08 18:39:35 -07:00
starfive clk: starfive: Make _clk_get become a common helper function 2025-01-14 10:55:00 -08:00
stm32 clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
sunxi clk: sunxi: Do not enable by default during compile testing 2025-04-27 13:49:18 +08:00
sunxi-ng I've recently moved computers (among other things) so I'm sending this from a 2025-05-30 09:15:40 -07:00
tegra clk: tegra: use clamp() in tegra_bpmp_clk_determine_rate() 2024-10-28 10:33:13 -07:00
thead clk: thead: Add clock support for VO subsystem in T-HEAD TH1520 SoC 2025-05-07 10:09:28 -07:00
ti The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
uniphier clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
ux500 clk: ux500: sysctrl: Add a determine_rate hook 2023-06-08 18:39:30 -07:00
versatile clk: Use of_property_present() 2024-08-02 16:53:38 -07:00
visconti clk: visconti: Switch to use kmemdup_array() 2024-08-14 17:37:25 -07:00
x86 clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
xilinx clk: clocking-wizard: calculate dividers fractional parts 2025-01-07 11:50:07 -08:00
zynq clk: zynq: Prevent null pointer dereference caused by kmalloc failure 2024-03-08 17:15:20 -08:00
zynqmp drivers: clk: zynqmp: update divider round rate logic 2023-12-16 17:20:14 -08:00
.kunitconfig clk: Allow kunit tests to run without OF_OVERLAY enabled 2024-10-22 14:09:20 -07:00
clk_kunit_helpers.c clk: test: Add test managed of_clk_add_hw_provider() 2024-10-09 16:25:32 -07:00
clk_parent_data_test.h clk: Add KUnit tests for clks registered with struct clk_parent_data 2024-07-29 15:33:13 -07:00
clk_test.c The core framework gained a clk provider helper, a clk consumer helper, and 2024-11-22 17:02:25 -08:00
clk-apple-nco.c clk: clk-apple-nco: Add NULL check in applnco_probe 2024-11-14 12:31:03 -08:00
clk-asm9260.c clk: asm9620: Remove 'hw' local variable that isn't checked 2023-09-11 13:12:53 -07:00
clk-aspeed.c Merge branches 'clk-imx', 'clk-samsung', 'clk-annotate', 'clk-marvell' and 'clk-lmk' into clk-next 2023-08-30 14:39:19 -07:00
clk-aspeed.h
clk-ast2600.c clk: ast2600: Add FSI parent clock with correct rate 2024-02-21 21:46:13 -08:00
clk-axi-clkgen.c clk: clk-axi-clkgen: make sure to enable the AXI bus clock 2024-11-14 14:43:40 -08:00
clk-axm5516.c clk: axm5516: Convert to devm_platform_ioremap_resource() 2023-08-22 14:28:05 -07:00
clk-bd718x7.c
clk-bm1880.c clk: bm1880: Convert to devm_platform_ioremap_resource() 2023-08-22 14:28:11 -07:00
clk-bulk.c
clk-cdce706.c clk: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-10-09 16:01:40 -07:00
clk-cdce925.c clk: cdce925: make regmap_cdce925_bus constant 2024-10-09 16:11:35 -07:00
clk-clps711x.c
clk-composite.c clk: composite: Fix handling of high clock rates 2023-06-12 17:42:10 -07:00
clk-conf.c clk: clk-conf: support assigned-clock-rates-u64 2024-08-16 15:21:19 -07:00
clk-cs2000-cp.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-devres.c clk: Provide devm_clk_bulk_get_all_enabled() helper 2024-10-22 13:55:22 -07:00
clk-divider.c clk: divider: Introduce CLK_DIVIDER_EVEN_INTEGERS flag 2024-10-17 11:16:01 -07:00
clk-en7523.c pci-v6.14-changes 2025-01-25 16:03:40 -08:00
clk-ep93xx.c clk: ep93xx: make const read-only arrays static 2025-01-13 13:27:26 -08:00
clk-eyeq.c clk: eyeq: add EyeQ6H west fixed factor clocks 2024-11-14 14:52:27 -08:00
clk-fixed-factor.c clk: fixed-factor: add clk_hw_register_fixed_factor_index() function 2024-11-14 14:52:26 -08:00
clk-fixed-mmio.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-fixed-rate_test.c clk: Add KUnit tests for clk fixed rate basic type 2024-07-29 15:33:13 -07:00
clk-fixed-rate_test.h clk: Add KUnit tests for clk fixed rate basic type 2024-07-29 15:33:13 -07:00
clk-fixed-rate.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-fractional-divider_test.c clk: test: add missing MODULE_DESCRIPTION() macros 2024-06-03 15:46:46 -07:00
clk-fractional-divider.c clk: fractional-divider: Use bit operations consistently 2024-03-08 17:07:11 -08:00
clk-fractional-divider.h
clk-fsl-flexspi.c
clk-fsl-sai.c clk: fsl-sai: Convert to devm_platform_ioremap_resource() 2023-08-22 14:28:15 -07:00
clk-gate_test.c clk: test: add missing MODULE_DESCRIPTION() macros 2024-06-03 15:46:46 -07:00
clk-gate.c clk: gate: fix comment typo and grammar 2023-09-11 13:20:40 -07:00
clk-gemini.c clk: gemini: Remove an unused field in struct clk_gemini_pci 2024-04-19 18:58:36 -07:00
clk-gpio.c clk: clk-gpio: add driver for gated-fixed-clocks 2024-10-16 11:20:42 -07:00
clk-hi655x.c
clk-highbank.c clk: highbank: Remove an unused field in struct hb_clk 2024-04-19 18:57:30 -07:00
clk-hsdk-pll.c clk: hsdk-pll: Convert to devm_platform_ioremap_resource() 2023-08-22 14:28:20 -07:00
clk-k210.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-lan966x.c clk: lan966x: add support for lan969x SoC clock driver 2024-10-13 19:21:11 +03:00
clk-lmk04832.c clk: lmk04832: make read-only const arrays static 2025-01-13 13:27:12 -08:00
clk-lochnagar.c clk: Use device_get_match_data() 2023-10-23 20:16:21 -07:00
clk-loongson1.c clk: loongson1: Re-implement the clock driver 2023-03-21 16:34:23 -07:00
clk-loongson2.c Merge branch 'clk-fixes' into clk-next 2025-01-21 11:22:46 -08:00
clk-max9485.c clk: Switch i2c drivers back to use .probe() 2023-05-10 14:05:34 -07:00
clk-max77686.c
clk-milbeaut.c clk: Annotate struct clk_hw_onecell_data with __counted_by 2023-08-22 13:51:26 -07:00
clk-moxart.c
clk-multiplier.c
clk-mux.c
clk-nomadik.c clk: Use str_enable_disable-like helpers 2025-01-15 12:27:04 -08:00
clk-npcm7xx.c clk: npcm7xx: Fix incorrect kfree 2023-10-18 18:06:05 -07:00
clk-npcm8xx.c clk: npcm8xx: add clock controller 2024-10-17 15:17:51 -07:00
clk-nspire.c
clk-palmas.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-plldig.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-pwm.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-qoriq.c clk: clk-qoriq: Replace of_node_put() with __free() 2024-10-09 16:01:00 -07:00
clk-renesas-pcie.c clk: rs9: fix wrong default value for clock amplitude 2024-04-19 19:09:41 -07:00
clk-rk808.c clk: RK808: Reduce 'struct rk808' usage 2023-05-15 16:13:56 +01:00
clk-s2mps11.c clk: s2mps11: initialise clk_hw_onecell_data::num before accessing ::hws[] in probe() 2025-05-08 14:01:44 -07:00
clk-scmi.c clk: scmi: Handle case where child clocks are initialized before their parents 2025-06-19 17:30:02 -07:00
clk-scpi.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-si514.c clk: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-10-09 16:01:40 -07:00
clk-si521xx.c Merge branch 'clk-cleanup' into clk-next 2023-10-30 14:12:53 -07:00
clk-si544.c Merge branch 'clk-cleanup' into clk-next 2023-10-30 14:12:53 -07:00
clk-si570.c Merge branch 'clk-cleanup' into clk-next 2023-10-30 14:12:53 -07:00
clk-si5341.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
clk-si5351.c of: remove internal arguments from of_property_for_each_u32() 2024-07-25 06:53:47 -05:00
clk-si5351.h
clk-sp7021.c clk: sp7021: fix return value check in sp7021_clk_probe() 2023-12-16 17:10:17 -08:00
clk-sparx5.c
clk-stm32f4.c clk: stm32f4: fix an uninitialized variable 2025-03-04 11:50:44 -08:00
clk-stm32h7.c clk: stm32h7: Remove an unused field in struct stm32_fractional_divider 2023-04-03 14:10:42 -07:00
clk-tps68470.c
clk-twl6040.c
clk-twl.c clk: twl: add TWL6030 support 2024-10-17 12:02:42 -07:00
clk-versaclock3.c clk: versaclock3: Add support for the 5L35023 variant 2024-12-10 14:49:29 -08:00
clk-versaclock5.c clk: versaclock5: Convert to use maple tree register cache 2023-10-09 20:31:23 -07:00
clk-versaclock7.c clk: versaclock7: Convert to use maple tree register cache 2023-10-09 20:31:23 -07:00
clk-vt8500.c
clk-wm831x.c clk: wm831x: clkout: Add a determine_rate hook 2023-06-08 18:39:28 -07:00
clk-xgene.c clk: Use str_enable_disable-like helpers 2025-01-15 12:27:04 -08:00
clk.c Merge branches 'clk-parent', 'clk-renesas', 'clk-mediatek' and 'clk-cleanup' into clk-next 2025-03-26 11:26:26 -07:00
clk.h
clkdev.c ARM: 9445/1: clkdev: Mark some functions with __printf() attribute 2025-03-26 13:31:49 +00:00
Kconfig clk: spacemit: Add clock support for SpacemiT K1 SoC 2025-04-17 03:22:53 +08:00
kunit_clk_assigned_rates_multiple_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_multiple.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_null_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_null.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_one_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_one.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_multiple_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_multiple.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_one_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_one.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_without_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_without.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_zero_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_zero.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates.h clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_fixed_rate_test.dtso clk: Add KUnit tests for clk fixed rate basic type 2024-07-29 15:33:13 -07:00
kunit_clk_parent_data_test.dtso clk: Add KUnit tests for clks registered with struct clk_parent_data 2024-07-29 15:33:13 -07:00
Makefile clk: spacemit: Add clock support for SpacemiT K1 SoC 2025-04-17 03:22:53 +08:00