[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSNvq-YjABITPQV5@vis>
Date: Sun, 23 Nov 2025 21:33:47 +0100
From: Jochen Sprickerhof <jspricke@...ian.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Salvatore Bonaccorso <carnil@...ian.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, 1121211@...s.debian.org,
linux-samsung-soc@...r.kernel.org, linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org, Kees Cook <kees@...nel.org>
Subject: Re: Bug#1121211: UBSAN: array-index-out-of-bounds in
/build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18
Hi Nathan,
* Nathan Chancellor <nathan@...nel.org> [2025-11-22 13:38]:
>I bet it is the same problem as the ones I fixed in
>
> 6dc445c19050 ("clk: bcm: rpi: Assign ->num before accessing ->hws")
> 9368cdf90f52 ("clk: bcm: dvp: Assign ->num before accessing ->hws")
>
>So something like this?
>
>Cheers,
>Nathan
>
>diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
>index 5f1a4f5e2e59..5b21025338bd 100644
>--- a/drivers/clk/samsung/clk-exynos-clkout.c
>+++ b/drivers/clk/samsung/clk-exynos-clkout.c
>@@ -175,6 +175,7 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT;
> clkout->mux.lock = &clkout->slock;
>
>+ clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> clkout->data.hws[0] = clk_hw_register_composite(NULL, "clkout",
> parent_names, parent_count, &clkout->mux.hw,
> &clk_mux_ops, NULL, NULL, &clkout->gate.hw,
>@@ -185,7 +186,6 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> goto err_unmap;
> }
>
>- clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> ret = of_clk_add_hw_provider(clkout->np, of_clk_hw_onecell_get, &clkout->data);
> if (ret)
> goto err_clk_unreg;
>
This fixes it for me, feel free to add a
Tested-by: Jochen Sprickerhof <jochen@...ickerhof.de>
Thanks!
Jochen
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists