wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fb9987d0f748c983bb795a86f47522313f701a08 · < d1c2ff2bd84c3692c9df267a2b991ce92bfca8ef| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
For the reasons also described in commit b383e8abed41 ("wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg()"), ath9k_htc_rx_msg() should validate pkt_len before accessing the SKB.
For example, the obtained SKB may have been badly constructed with pkt_len = 8. In this case, the SKB can only contain a valid htc_frame_hdr but after being processed in ath9k_htc_rx_msg() and passed to ath9k_wmi_ctrl_rx() endpoint RX handler, it is expected to have a WMI command header which should be located inside its data payload.
Implement sanity checking inside ath9k_wmi_ctrl_rx(). Otherwise, uninit memory can be referenced.
Tested on Qualcomm Atheros Communications AR9271 802.11n .
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
From the CVE record · Linux
The Linux kernel’s ath9k_wmi_ctrl_rx() handler does not adequately check packet length before accessing a WMI command header. A badly constructed received packet can cause it to reference uninitialized memory. The input does not establish authentication or user-interaction requirements.
Engineers running Linux kernels with the ath9k Wi-Fi driver should check their versions; affected versions are not specified.