[PATCH 1/3] firmware: arm_scmi: imx: Track copied syslog words

Sudeep Holla sudeep.holla at kernel.org
Wed Oct 28 06:55:46 PDT 2026


On Wed, Oct 28, 2026 at 09:49:09PM +0800, Peng Fan wrote:
> On Wed, Oct 28, 2026 at 01:05:00PM +0000, Sudeep Holla wrote:
> >The MISC syslog iterator records the number of returned words plus
> >firmware-reported remaining words in the caller's size output.
> >
> >The debugfs consumer uses that value to dump its fixed-size buffer. A
> >malformed or inconsistent response can therefore make it read beyond
> >the copied data and allocation.
> >
> >Return the accumulated number of words copied into the caller's buffer
> >instead. The generic iterator bounds this count to the initial buffer
> >capacity before processing each response.
> >
> >Reported-by: Sashiko <sashiko-bot at kernel.org>
> >Closes: https://sashiko.dev/#/bug/linux-c3c9437c-ba1a-4db6-837f-cb0950d89018
> 
> This should be: https://sashiko.dev/#/bug/linux-67e325a9-473e-450a-a2a0-bf4c0c720624
>

Thanks, my bad copy-paste error. Thought it was copied but no 😢.

> >Fixes: 4fa62e80c7db ("firmware: arm_scmi: imx: Support getting syslog of MISC protocol")
> >Signed-off-by: Sudeep Holla <sudeep.holla at kernel.org>
> 
> Reviewed-by: Peng Fan <peng.fan at nxp.com>
> 

Thanks!

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list