staging: rtl8723bs: fix OOB read in OnAssocRsp() IE loop
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 554c0a3abf216c991c5ebddcdb2c08689ecd290b · < 04f612dc03427e0b1ac80a2611b5ac0ba93ac446| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix OOB read in OnAssocRsp() IE loop
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.
From the CVE record · Linux
The Linux kernel's rtl8723bs driver can read beyond a receive buffer while parsing an association response. A malicious access point can trigger the read by sending a crafted response with a truncated information element; no authentication or user interaction requirement is specified.
Engineers running Linux systems that use the rtl8723bs driver should check their kernel version; affected versions are not specified.