]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: rtl8723bs: fix out-of-bounds read in OnBeacon ESR IE parsing
authorNavaneeth K <knavaneeth786@gmail.com>
Thu, 20 Nov 2025 16:35:20 +0000 (16:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Dec 2025 17:37:21 +0000 (18:37 +0100)
commitd1ab7f9cee22e7b8a528da9ac953e4193b96cda5
tree2ffec256439eca6f048312ff325bc2928f39abf4
parent61871c83259a511980ec2664964cecc69005398b
staging: rtl8723bs: fix out-of-bounds read in OnBeacon ESR IE parsing

commit 502ddcc405b69fa92e0add6c1714d654504f6fd7 upstream.

The Extended Supported Rates (ESR) IE handling in OnBeacon accessed
*(p + 1 + ielen) and *(p + 2 + ielen) without verifying that these
offsets lie within the received frame buffer. A malformed beacon with
an ESR IE positioned at the end of the buffer could cause an
out-of-bounds read, potentially triggering a kernel panic.

Add a boundary check to ensure that the ESR IE body and the subsequent
bytes are within the limits of the frame before attempting to access
them.

This prevents OOB reads caused by malformed beacon frames.

Signed-off-by: Navaneeth K <knavaneeth786@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c