wifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 459c51ad6e1fc19e91a53798358433d3c08cd09d · < fcd9c923b58e86501450b9b442ccc7ce4a8d0fda| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev()
There is a potential NULL pointer dereference in zd_mac_tx_to_dev(). For example, the following is possible:
T0 T1 zd_mac_tx_to_dev() /* len == skb_queue_len(q) */ while (len > ZD_MAC_MAX_ACK_WAITERS) {
filter_ack() spin_lock_irqsave(&q->lock, flags); /* position == skb_queue_len(q) */ for (i=1; i<position; i++) skb = __skb_dequeue(q)
if (mac->type == NL80211_IFTYPE_AP) skb = __skb_dequeue(q); spin_unlock_irqrestore(&q->lock, flags);
skb_dequeue() -> NULL
Since there is a small gap between checking skb queue length and skb being unconditionally dequeued in zd_mac_tx_to_dev(), skb_dequeue() can return NULL. Then the pointer is passed to zd_mac_tx_status() where it is dereferenced.
From the CVE record · Linux
A race in the Linux kernel’s zd1211rw Wi-Fi driver can cause zd_mac_tx_to_dev() to pass a NULL packet buffer to zd_mac_tx_status(), where it is dereferenced. The issue occurs if the packet queue changes between a length check and a dequeue operation. The input does not establish an attacker path or specify network, authentication, or user-interaction requirements.
Engineers running Linux kernels with the zd1211rw Wi-Fi driver should check their kernel version; affected versions are not specified in the input.