]> 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:40:23 +0000 (18:40 +0100)
commit38292407c2bb5b2b3131aaace4ecc7a829b40b76
treee6c645f4b5668f1a865b2f34f60fb0ea3adcf2e4
parent25411f5fcf5743131158f337c99c2bbf3f8477f5
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