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/imx
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
..
clk-busy.c clk: imx: busy: Add a determine_rate hook 2023-06-08 18:39:28 -07:00
clk-composite-7ulp.c clk: imx: composite-7ulp: Use NULL instead of 0 2024-06-24 14:22:08 +03:00
clk-composite-8m.c clk: imx: composite-8m: Enable gate clk with mcore_booted 2024-06-21 09:35:20 +03:00
clk-composite-93.c clk: imx: composite-93: keep root clock on when mcore enabled 2024-06-21 09:35:21 +03:00
clk-cpu.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-divider-gate.c clk: imx: clk-divider-gate: Switch to clk_divider.determine_rate 2021-08-24 16:09:07 +03:00
clk-fixup-div.c clk: imx: drop redundant initialization 2020-02-17 14:32:32 +08:00
clk-fixup-mux.c clk: imx: fixup-mux: Add a determine_rate hook 2023-06-08 18:39:29 -07:00
clk-frac-pll.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-fracn-gppll.c clk: imx: fracn-gppll: fix pll power up 2024-11-05 12:02:22 +02:00
clk-gate2.c clk: imx: gate2: Remove unused variable ret 2020-11-10 09:08:03 +08:00
clk-gate-93.c clk: imx: add i.MX93 clk gate 2022-09-19 13:06:45 +03:00
clk-gate-exclusive.c This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
clk-gpr-mux.c clk: imx: clk-gpr-mux: Simplify .determine_rate() 2023-07-25 10:35:10 +03:00
clk-imx1.c clk: imx: Drop inclusion of unused header <soc/imx/timer.h> 2023-06-23 09:33:43 +02:00
clk-imx5.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6q.c clk: imx6q: add ethernet refclock mux support 2023-01-31 14:45:03 +02:00
clk-imx6sl.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6sll.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6sx.c clk: imx: imx6sx: Allow a different LCDIF1 clock parent 2023-10-04 15:33:47 +03:00
clk-imx6ul.c clk: imx6ul: fix clock parent for IMX6UL_CLK_ENETx_REF_SEL 2024-09-04 12:39:38 +03:00
clk-imx7d.c clk: imx: add CLK_SET_RATE_PARENT for lcdif_pixel_src for i.MX7D 2024-06-21 09:35:25 +03:00
clk-imx7ulp.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx8-acm.c clk: imx: imx8-acm: Fix return value check in clk_imx_acm_attach_pm_domains() 2024-11-05 12:07:59 +02:00
clk-imx8dxl-rsrc.c clk: imx8: remove MLB support 2023-10-04 15:44:11 +03:00
clk-imx8mm.c clk: imx: imx8mm: Change the 'nand_usdhc_bus' clock to non-critical one 2024-06-21 09:35:26 +03:00
clk-imx8mn.c clk: imx: imx8mn: add sai7_ipg_clk clock settings 2024-06-21 09:35:25 +03:00
clk-imx8mp-audiomix.c clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents 2025-03-03 18:49:45 +02:00
clk-imx8mp.c clk: imx8mp: inform CCF of maximum frequency of clocks 2025-03-03 19:02:15 +02:00
clk-imx8mq.c clk: imx: imx8mq: correct error handling path 2023-10-04 11:35:56 +03:00
clk-imx8qm-rsrc.c clk: imx: imx8qm/qxp: add more resources to whitelist 2023-10-04 15:44:19 +03:00
clk-imx8qxp-lpcg.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-imx8qxp-lpcg.h clk: imx8: remove MLB support 2023-10-04 15:44:11 +03:00
clk-imx8qxp-rsrc.c clk: imx: imx8qm/qxp: add more resources to whitelist 2023-10-04 15:44:19 +03:00
clk-imx8qxp.c clk: imx: imx8qxp: Parent should be initialized earlier than the clock 2024-06-21 09:35:29 +03:00
clk-imx8ulp.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-imx25.c clk: imx25: make __mx25_clocks_init return void 2023-08-14 12:41:05 +03:00
clk-imx27.c clk: imx: Drop inclusion of unused header <soc/imx/timer.h> 2023-06-23 09:33:43 +02:00
clk-imx31.c clk: imx: Drop inclusion of unused header <soc/imx/timer.h> 2023-06-23 09:33:43 +02:00
clk-imx35.c clk: imx: Drop inclusion of unused header <soc/imx/timer.h> 2023-06-23 09:33:43 +02:00
clk-imx93.c clk: imx: Apply some clks only for i.MX93 2024-12-26 16:46:03 +02:00
clk-imx95-blk-ctl.c clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data 2025-06-19 17:32:40 -07:00
clk-imxrt1050.c clk: imx: add missing MODULE_DESCRIPTION() macros 2024-06-24 14:21:09 +03:00
clk-lpcg-scu.c clk: imx: lpcg-scu: Skip HDMI LPCG clock save/restore 2024-11-05 12:02:23 +02:00
clk-pfd.c clk: imx: fix compile testing imxrt1050 2023-02-10 15:25:33 -08:00
clk-pfdv2.c clk: imx: Fix the build break when clk-imx8ulp build as module 2021-10-01 10:15:42 +03:00
clk-pll14xx.c clk: imx: pll14xx: Add 208 MHz and 416 MHz entries for PLL1416x 2024-12-26 16:28:18 +02:00
clk-pllv1.c clk: imx: pllv1: fix kernel-doc notation for struct clk_pllv1 2021-12-02 17:26:40 -08:00
clk-pllv2.c clk: imx: pllv2: Switch to clk_hw based API 2019-12-11 19:19:44 +08:00
clk-pllv3.c clk: imx: fix compile testing imxrt1050 2023-02-10 15:25:33 -08:00
clk-pllv4.c clk: imx: pllv4: Fix SPLL2 MULT range 2023-08-14 12:29:52 +03:00
clk-scu.c clk: imx: clk-scu: fix clk enable state save and restore 2024-11-05 12:02:22 +02:00
clk-scu.h clk: imx: Add imx8dxl clk driver 2022-01-29 15:12:07 +02:00
clk-sscg-pll.c clk: imx: remove redundant re-assignment of pll->base 2022-03-09 10:39:25 -08:00
clk-vf610.c clk: imx: vf610: Add CRC clock 2020-08-23 10:08:35 +08:00
clk.c clk: imx: add missing MODULE_DESCRIPTION() macros 2024-06-24 14:21:09 +03:00
clk.h clk: imx: clk-imx8mp: Allow media_disp pixel clock reconfigure parent rate 2024-06-21 09:35:30 +03:00
Kconfig clk: imx: clk-audiomix: Add reset controller 2024-06-21 07:44:01 +03:00
Makefile clk: imx: add i.MX95 BLK CTL clk driver 2024-04-22 12:58:10 +03:00