Re: [PATCH v1] mailbox: mchp-ipc-sbi: fix out-of-bounds access in mchp_ipc_get_cluster_aggr_irq()

From: Conor Dooley

Date: Thu Nov 13 2025 - 09:27:49 EST


On Thu, Nov 13, 2025 at 01:49:22PM +0000, Valentina Fernandez wrote:
> The cluster_cfg array is dynamically allocated to hold per-CPU
> configuration structures, with its size based on the number of online
> CPUs. Previously, this array was indexed using hartid, which may be
> non-contiguous or exceed the bounds of the array, leading to
> out-of-bounds access.
> Switch to using cpuid as the index, as it is guaranteed to be within
> the valid range provided by for_each_online_cpu().
>
> Signed-off-by: Valentina Fernandez <valentina.fernandezalanis@xxxxxxxxxxxxx>

Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>

Cheers,
Conor.

Attachment: signature.asc
Description: PGP signature