CVE-2026-99454: staging: rtl8723bs: fix protected RX frame validation in decrypt path
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix protected RX frame validation in decrypt path
The RX software decrypt path mishandles crafted protected frames from a malicious AP in two ways:
1) decryptor() never checks that a protected frame is long enough to hold the 802.11 header plus the per-cipher trailer. All of rtwwepdecrypt(), rtwtkipdecrypt() and rtwaesdecrypt() compute
length = hdr.len - hdrlen - ivlen;
and act on the result, and recvframechkmic() similarly computes
datalen = hdr.len - hdrlen - ivlen - icvlen - 8;
for TKIP (the 8-byte Michael MIC is not accounted for in icvlen). A frame shorter than hdrlen + ivlen + icvlen (+ 8 for TKIP) underflows these unsigned subtractions, turning into a ~4 GiB iteration count in aesdecipher()/arc4crypt()/rtwseccalctkipmic() or a ~4 GiB crc32le() length, causing out-of-bounds reads/writes of up to ~4 GiB starting from the rx skb. Reject such frames in decryptor() before touching the IV; this covers all three ciphers and the TKIP MIC check, and also keeps the unconditional iv[3] access within the frame.
2) validate80211wmgmt() keeps using the frame - two memcpys through the stale rxdata pointer and a pktlen update - before checking whether decryptor() returned NULL. On decrypt failure (e.g. a unicast protected deauth/disassoc/action frame with a bad MIC, which this path always software-decrypts) the skb has already been freed, so this is a use-after-free read/write, and the caller's error path frees the frame a second time, drifting freerecvframecnt. Bail out immediately when decryptor() fails, freeing the temporary mgmtDATA buffer first.
Discovered by Atuin - Automated Vulnerability Discovery Engine.
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.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Compensating control
In the Linux kernel staging rtl8723bs RX decrypt path, reject protected frames before accessing the IV unless their length is at least hdrlen + iv_len + icv_len, plus 8 bytes for TKIP's Michael MIC.
- Compensating control
In the rtl8723bs RX error path, bail out immediately when decryptor() returns NULL; do not use the stale rx_data pointer or update pkt_len, and do not free the frame a second time.