Re: [PATCH wireless 2/2] wifi: brcmfmac: fwsignal: bound the MACDESC_ADD interface index

From: Arend van Spriel

Date: Tue Nov 24 2026 - 15:14:10 EST


On Mon, 16 Nov 2026 02:58:43 +0800, Maoyi Xie <maoyixie.tju@xxxxxxxxx> wrote:
> brcmf_fws_macdesc_indicate() stores the interface index of a
> MACDESC_ADD signal without a check. brcmf_fws_macdesc_closed() later
> uses it as an index.
>
> if_entry = &fws->desc.iface[entry->interface_id];
>
> A device that reports an index of BRCMF_MAX_IFS or more makes this read
> past iface[]. On USB this parser runs with the default module
> parameters. Reject such a signal as
> brcmf_fws_interface_state_indicate() does, and count it as a failed
> update.
>
> This was found with a static analysis tool that we develop. A userspace
> harness that compiles the fwsignal.c functions unchanged shows the
> out-of-bounds index under UBSAN before this patch, but not after it. No
> hardware was available for testing.
>
> Fixes: b75c1a301b7d ("brcmfmac: destination mac closed when interface is closed")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Maoyi Xie <maoyixie.tju@xxxxxxxxx>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>

Regards,
Arend