wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 44b23b488d44e56d467764ecb661830e5b02b308 · < c766e37fccd5a5c5059be7efcd9618bf8a2c17c3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
Syzkaller detected a memory leak of skbs in ath9k_hif_usb_rx_stream(). While processing skbs in ath9k_hif_usb_rx_stream(), the already allocated skbs in skb_pool are not freed if ath9k_hif_usb_rx_stream() fails. If we have an incorrect pkt_len or pkt_tag, the input skb is considered invalid and dropped. All the associated packets already in skb_pool should be dropped and freed. Added a comment describing this issue.
The patch also makes remain_skb NULL after being processed so that it cannot be referenced after potential free. The initialization of hif_dev fields which are associated with remain_skb (rx_remain_len, rx_transfer_len and rx_pad_len) is moved after a new remain_skb is allocated.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
From the CVE record · Linux
The Linux kernel’s ath9k USB receive stream can leak allocated packet buffers when processing fails because of an incorrect packet length or tag. Whether an attacker can trigger this, and any required access, authentication, or user interaction, is not specified.
Engineers running Linux kernels with the ath9k USB driver should check their affected versions; no version range is provided.