iio: adc: xilinx-xadc: free IRQ before cancelling the unmask worker on unbind
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2a9685d1a3b7644ca08d8355fc238b43faef7c3e · < 0f3f427076240e75ff265e61645627a71ca4918c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: xilinx-xadc: free IRQ before cancelling the unmask worker on unbind
The ZYNQ XADC alarm IRQ handler queues zynq_unmask_work via schedule_delayed_work(); that work is cleared by a devm callback. Register the devm callback before devm_request_irq() so the devres LIFO teardown frees the IRQ first, ensuring the handler can no longer queue work by the time the workqueue is cleared. Otherwise the handler could re-arm the work and run it after the xadc structure has been freed.
This issue was found by an in-house static analysis tool.
From the CVE record · Linux
The Linux kernel’s Xilinx XADC driver can leave delayed work queued after its data structure is freed if an alarm IRQ races with device unbind. This could cause a use-after-free; the input does not identify an attacker path, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with the Xilinx XADC driver should check whether their kernel includes the fix; affected versions are not specified.