staging: rtl8723bs: fix OOB write in HT_caps_handler()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 554c0a3abf216c991c5ebddcdb2c08689ecd290b · < 225b6d3fc7e99ac3d20b6c861d1e47d24e7ea31d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix OOB write in HT_caps_handler()
HT_caps_handler() iterates pIE->length bytes and writes into HT_caps.u.HT_cap[], which is a fixed 26-byte array (sizeof struct HT_caps_element). Because pIE->length is a raw u8 from an over-the-air 802.11 AssocResponse frame and is never validated, a malicious AP can set it up to 255, causing up to 229 bytes of out-of-bounds writes into adjacent fields of struct mlme_ext_info.
Truncate the iteration count to the size of HT_caps.u.HT_cap using umin() so that data from a longer-than-expected IE is silently ignored rather than written out of bounds, preserving interoperability with APs that pad the element. An early return on oversized IEs was considered but rejected: it would bypass the pmlmeinfo->HT_caps_enable = 1 assignment that precedes the loop, silently disabling HT mode for APs that append extra bytes to the HT Capabilities IE.
From the CVE record · Linux
The Linux kernel's rtl8723bs driver does not validate the length of an HT Capabilities element in an over-the-air 802.11 association response. A malicious access point can supply an oversized element and cause an out-of-bounds write when the driver processes the response.
Engineers running Linux kernels with the rtl8723bs driver should check whether their kernel includes the fix; affected versions were not specified.