Re: [PATCH v2] wifi: brcmfmac: drop glom superframe on header parse failure
From: Arend van Spriel
Date: Sun Nov 15 2026 - 16:03:06 EST
On Fri, 9 Oct 2026 15:22:32 +0800, Shirong Zhao <shxzhaosr@xxxxxxx> wrote:
> brcmf_sdio_rxglom() uses rd_new.len_nxtfrm and rd_new.dat_offset
> right after the superframe brcmf_sdio_hdparse() without checking
> errcode. On parse failure those fields are either uninitialized
> (the early -ENODATA/-EIO/-EPROTO returns) or hold a rejected value
> (the -ENXIO bad-offset return), so bus->cur_read.len gets garbage
> and skb_pull() runs with a garbage length.
>
> Check errcode first and drop the superframe with the same cleanup
> used for a bad subframe below.
>
> Verified against wireless.git main (fd4e7f1137291), the current
> wireless fixes tree.
>
> Signed-off-by: Shirong Zhao <shxzhaosr@xxxxxxx>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
Nit: as this is a fix, please consider adding a Fixes tag, which looks to be
9d7d6f95bda1 ("brcmfmac: streamline header parse code of sdio glom read"),
and Cc: stable if you want it in the wireless tree.
Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Regards,
Arend