public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Frank.li@nxp.com, Xiaolei Wang <xiaolei.wang@windriver.com>,
	abelvesa@kernel.org, festevam@gmail.com, kernel@pengutronix.de,
	mturquette@baylibre.com, peng.fan@nxp.com,
	s.hauer@pengutronix.de, shawnguo@kernel.org
Cc: linux-clk@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data
Date: Thu, 19 Jun 2025 17:38:49 -0700	[thread overview]
Message-ID: <175037992976.4372.2373294324696093637@lazor> (raw)
In-Reply-To: <20250619062108.2016511-1-xiaolei.wang@windriver.com>

Quoting Xiaolei Wang (2025-06-18 23:21:08)
> 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: 5224b189462f ("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>
> ---

Applied to clk-fixes


      parent reply	other threads:[~2025-06-20  0:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19  6:21 [PATCH v3] clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data Xiaolei Wang
2025-06-20  0:29 ` Peng Fan
2025-06-20  0:38 ` Stephen Boyd [this message]

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=175037992976.4372.2373294324696093637@lazor \
    --to=sboyd@kernel.org \
    --cc=Frank.li@nxp.com \
    --cc=abelvesa@kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=xiaolei.wang@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox