wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3deff76095c4ac4252e27c537db3041f619c23a2 · < 355f16f756aad0c95cdaa0c14a34ab4137d32815| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
It is possible that skb is freed in ath9k_htc_rx_msg(), then usb_submit_urb() fails and we try to free skb again. It causes use-after-free bug. Moreover, if alloc_skb() fails, urb->context becomes NULL but rx_buf is not freed and there can be a memory leak.
The patch removes unnecessary nskb and makes skb processing more clear: it is supposed that ath9k_htc_rx_msg() either frees old skb or passes its managing to another callback function.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
From the CVE record · Linux
The Linux kernel’s ath9k hif_usb callback can use memory after it is freed if ath9k_htc_rx_msg() frees an skb and usb_submit_urb() then fails, causing the skb to be freed again. An alloc_skb() failure can also cause a memory leak. The input does not establish whether an attacker can trigger these conditions or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the ath9k hif_usb component should check their kernels; affected versions are not specified.