]> git.ipfire.org Git - thirdparty/kernel/linux.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>
Thu, 27 Nov 2025 14:16:37 +0000 (15:16 +0100)
commit502ddcc405b69fa92e0add6c1714d654504f6fd7
tree7ae6f6187a181eef0bd6619bc2e9a4edc0d8f269
parent6ef0e1c10455927867cac8f0ed6b49f328f8cf95
staging: rtl8723bs: fix out-of-bounds read in OnBeacon ESR IE parsing

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