Re: [PATCH 2/4] firmware: arm_scmi: Validate BASE_ERROR_EVENT payload size

Cristian Marussi <[email protected]>
Newsgroups org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel
Message-ID <agwoWOQm_dPrQvwa@pluto>
On Sun, May 17, 2026 at 08:02:41PM +0100, Sudeep Holla wrote:
> BASE_ERROR_EVENT carries a variable number of message reports,
> with the count encoded in error_status. The notification parser used
> that count without checking whether the received payload contained all
> reported entries.
> 
> Reject truncated payloads before copying the report array.
> 
> Signed-off-by: Sudeep Holla <[email protected]>


Not sure is the missing check was due to some sort of best effort
attempt to report whatever the platform was able to report or what...
...but it seems correct to check and discard corrupted replies.

LGTM.
Reviewed-by: Cristian Marussi <[email protected]>

Thanks,
Cristian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.