staging: rtl8723bs: fix protected RX frame validation in decrypt path
NIST has received this entry but not started reviewing it.
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 rtw_wep_decrypt(), rtw_tkip_decrypt() and rtw_aes_decrypt() compute length = hdr.len - hdrlen - iv_len; and act on the result, and recvframe_chkmic() similarly computes datalen = hdr.len - hdrlen - iv_len - icv_len - 8; for TKIP (the 8-byte Michael MIC is not accounted for in icv_len). A frame shorter than hdrlen + iv_len + icv_len (+ 8 for TKIP) underflows these unsigned subtractions, turning into a ~4 GiB iteration count in aes_decipher()/arc4_crypt()/rtw_seccalctkipmic() or a ~4 GiB crc32_le() 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) validate_80211w_mgmt() keeps using the frame - two memcpys through the stale rx_data pointer and a pkt_len 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 free_recvframe_cnt. Bail out immediately when decryptor() fails, freeing the temporary mgmt_DATA buffer first. Discovered by Atuin - Automated Vulnerability Discovery Engine.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before d65f8309c25bf52dd2f18ae12670a8f7063a89f2; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 4992aed169e5c0db152f4a1a2e7f86d67aef8eee; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before f8eb2d12c741af831b7169eb3a65a327438605f1; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 8d291314426d5626407ba6e281992f14bee96785; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 60e3352593f224306dfab578bf586b301642265f; from 554c0a3abf216c991c5ebddcdb2c08689ecd290b, before 33e8f5740319996788395d85a4c100f61593cb75; and 2 more | d65f8309c25bf52dd2f18ae12670a8f7063a89f2; 4992aed169e5c0db152f4a1a2e7f86d67aef8eee; f8eb2d12c741af831b7169eb3a65a327438605f1; 8d291314426d5626407ba6e281992f14bee96785 |
| Linux Linux | Software | 4.12 | not recorded |
The 8.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Nearby network | The attacker has to be on the same local network (office Wi-Fi or the same hosting network). |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 2.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 8 sources for this flaw, none tagged as a vendor patch.