Re: [PATCH] clk: rs9: Reserve 8 struct clk_hw slots for for 9FGV0841

From: Marek Vasut

Date: Mon Jan 19 2026 - 10:03:44 EST


On 1/19/26 2:55 PM, Geert Uytterhoeven wrote:

Hello Geert,

On Sun, 18 Jan 2026 at 03:58, Marek Vasut
<marek.vasut+renesas@xxxxxxxxxxx> wrote:
The 9FGV0841 has 8 outputs and registers 8 struct clk_hw, make sure
there are 8 slots for those newly registered clk_hw pointers, else
there is going to be out of bounds write when pointers 4..7 are set
into struct rs9_driver_data .clk_dif[4..7] field.

Since there are other structure members past this struct clk_hw
pointer array, writing to .clk_dif[4..7] fields only corrupts the
struct rs9_driver_data content, without crashing the kernel. However,

I am not sure that is true. As the last 3 fields are just bytes, up to 3
pointers may be written outside the structure, which is 32 or 64 bytes large.
So any buffer overflow may corrupt another object from the 32-byte or
64-byte slab.
Indeed, updated in V2, thanks.