mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@mailbox.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-clk@vger.kernel.org, stable@vger.kernel.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] clk: rs9: Reserve 8 struct clk_hw slots for for 9FGV0841
Date: Mon, 19 Jan 2026 16:03:32 +0100	[thread overview]
Message-ID: <d67b03aa-5f9f-4cc5-adc4-549cc2e71688@mailbox.org> (raw)
In-Reply-To: <CAMuHMdVkYUwYHOCtFb==YJ=1TK9+Tz1X=teaoyoooxe42eBYFw@mail.gmail.com>

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@mailbox.org> 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.

      reply	other threads:[~2026-01-19 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18  2:56 Marek Vasut
2026-01-19 13:55 ` Geert Uytterhoeven
2026-01-19 15:03   ` Marek Vasut [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=d67b03aa-5f9f-4cc5-adc4-549cc2e71688@mailbox.org \
    --to=marek.vasut@mailbox.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®