wifi: mac80211: fortify the spinlock against deadlock by interrupt
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
06.1.306.3.46.4In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: fortify the spinlock against deadlock by interrupt
In the function ieee80211_tx_dequeue() there is a particular locking sequence:
begin: spin_lock(&local->queue_stop_reason_lock); q_stopped = local->queue_stop_reasons[q]; spin_unlock(&local->queue_stop_reason_lock);
However small the chance (increased by ftracetest), an asynchronous interrupt can occur in between of spin_lock() and spin_unlock(), and the interrupt routine will attempt to lock the same &local->queue_stop_reason_lock again.
This will cause a costly reset of the CPU and the wifi device or an altogether hang in the single CPU and single core scenario.
The only remaining spin_lock(&local->queue_stop_reason_lock) that did not disable interrupts was patched, which should prevent any deadlocks on the same CPU/core and the same wifi device.
This is the probable trace of the deadlock:
From the CVE record · Linux
The Linux kernel’s mac80211 transmit-queue code can be interrupted while holding a spinlock, allowing the interrupt handler to try to acquire the same lock. This can reset the CPU and Wi-Fi device or, on a single-core system, cause a hang. The input does not establish an attacker-controlled trigger, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with mac80211 Wi-Fi support should check their kernel’s status; affected versions are not specified.