[lvc-project] [PATCH 5.10] staging: rtl8723bs: fix OOB read in OnAssocRsp() IE loop

Luka Gejak luka.gejak at linux.dev
Mon Oct 12 17:19:04 MSK 2026


October 12, 2026 at 4:06 PM, "Mikhail Dmitrichenko" <mdmitrichenko at astralinux.ru> wrote:


> 
> From: Alexandru Hossu <hossu.alexandru at gmail.com>
> 
> commit f9654207e92283e0acac5d64fe5f8835383b5a23 upstream.
> 
> The IE parsing loop in OnAssocRsp() advances by (pIE->length + 2) each
> iteration but only guards on i < pkt_len. When a malicious AP sends an
> AssocResponse whose last IE has only one byte remaining in the frame
> (the element_id byte lands at pkt_len-1), the loop reads pIE->length
> from pframe[pkt_len], which is one byte past the allocated receive buffer.
> 
> Additionally, even when the header bytes are in bounds, pIE->length
> itself can extend the data window beyond pkt_len, silently passing a
> truncated IE to the handler functions.
> 
> Add two guards at the top of the loop body:
>  1. Break if fewer than sizeof(*pIE) bytes remain (can't read header).
>  2. Break if the IE's declared data extends past pkt_len.
> 
> Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
> Cc: stable <stable at kernel.org>
> Signed-off-by: Alexandru Hossu <hossu.alexandru at gmail.com>
> Reviewed-by: Luka Gejak <luka.gejak at linux.dev>
> Link: https://patch.msgid.link/20260522004531.1038924-6-hossu.alexandru@gmail.com
> Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
[...]

Hi Mikhail,

It seems to me that this was sent by accident by running git format-patch -1

You probably forgot to commit so git made last commit into a patch file.

Either way staging rtl8723bs is getting removed in linux 7.4 so any
further commits for rtl8723bs are discouraged.

Best regards,
Luka Gejak



More information about the lvc-project mailing list