wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8b3046abc99eefe11438090bcc4ec3a3994b55d0 · < 4afa0246656d5680c8a4c3fb37ba6570c4ab819b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete
The ath9k_wmi_event_tasklet() used in ath9k_htc assumes that all the data structures have been fully initialised by the time it runs. However, because of the order in which things are initialised, this is not guaranteed to be the case, because the device is exposed to the USB subsystem before the ath9k driver initialisation is completed.
We already committed a partial fix for this in commit: 8b3046abc99e ("ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()")
However, that commit only aborted the WMI_TXSTATUS_EVENTID command in the event tasklet, pairing it with an "initialisation complete" bit in the TX struct. It seems syzbot managed to trigger the race for one of the other commands as well, so let's just move the existing synchronisation bit to cover the whole tasklet (setting it at the end of ath9k_htc_probe_device() instead of inside ath9k_tx_init()).
From the CVE record · Linux
The Linux kernel's ath9k_htc driver can run a WMI event tasklet before driver initialization is complete, allowing it to access data structures that are not fully initialized. The race occurs because the device is exposed to the USB subsystem before initialization finishes. The input does not establish whether triggering it requires network or local access, authentication, or user interaction.
Engineers running Linux kernels with the ath9k_htc driver should check their versions against the vendor advisory; affected versions are not specified in the input.