CVE-2026-139688: wifi: rtw88: sdio: zero the padding added to a TX transfer
In the Linux kernel, the following vulnerability has been resolved:
wifi: rtw88: sdio: zero the padding added to a TX transfer
rtwsdiowriteport() rounds the transfer up with sdioalignsize() and then hands that length to sdiomemcpytoio() while the skb still only holds skb->len bytes. The difference, between one and 511 bytes, is read from beyond the end of the frame and transmitted. Whether it stays inside the skb's allocation depends on how much tailroom the skb happens to have, so this is at best sending uninitialised memory over the air.
Pad the skb up to the transfer size first. skbpad() zeroes the added bytes, reallocates a cloned skb rather than writing into a buffer a clone still shares, and leaves skb->len alone, so nothing else in the transmit path has to change.
It must not free the skb on failure: rtwsdiowritedata() frees the skb itself and rtwsdioprocesstxqueue() requeues it, so both callers still own it and would double free.
Found while reworking this path for the RTL8723BS. Measured on RTL8723BS hardware, padding the transfer costs about 2% observable over transfer: uplink is 19.5 to 19.8 Mbit/s padded against 20.9 to 21.1 Mbit/s unpadded in an interleaved A/B, with scans, reconnection and a UDP flood clean in both. The other SDIO parts sharing this path are untested; I have only the RTL8723BS.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In the RTL8723BS SDIO transmit path, pad the skb to the rounded transfer size with __skb_pad() before sdio_memcpy_toio(); this zeroes the added bytes.
Event History
Frequently Asked Questions
Which deployments are in scope?
The issue is in the rtw88 SDIO transmit path. RTL8723BS hardware is specifically mentioned as having been used during investigation and performance measurement.
What is the security impact of the out-of-bounds read?
Between one and 511 bytes beyond the frame can be included in an SDIO transfer and transmitted over the air. Depending on available skb tailroom, those bytes may contain uninitialised memory.
Is the reported CWE evidence of an existing double-free vulnerability?
The described flaw is an out-of-bounds read and potential disclosure of uninitialised memory. Double-free handling is discussed as a requirement for the fix: the padding operation must not free an skb on failure because callers retain ownership and may requeue or free it.
What operational impact was observed for the fix?
On RTL8723BS, padding the transfer was measured at roughly a 2% observable uplink throughput cost: 19.5 to 19.8 Mbit/s padded versus 20.9 to 21.1 Mbit/s unpadded.