iio: trigger: cancel reenable_work before freeing trigger
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9020ef659885f2622cfb386cc229b6d618362895 · < 882d0011c59ff8ac15188ec9ce071399ecfa10ad| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: trigger: cancel reenable_work before freeing trigger
iio_trigger_notify_done_atomic() defers ->reenable() into trig->reenable_work on the system workqueue, and the worker dereferences the owning trigger through container_of(). Nothing cancels this work before iio_trig_release() frees the trigger, so a worker armed by the last in-flight IRQ can outlive the free and touch freed memory.
Cancel it at the top of iio_trig_release(), which every free path reaches through the device core's final put_device().
Found by an in-house static analysis tool.
From the CVE record · Linux
The Linux kernel’s IIO trigger code can leave deferred work running after its trigger is freed. If a last in-flight IRQ schedules that work, the worker can access freed memory. The input does not specify whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running Linux kernels with the affected IIO trigger code should check their deployments; affected versions are not specified.