iio: trigger: sysfs: fix use-after-free on remove
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f38bc926d022ebd67baad6ac7fc22c95fbc6238c · < 4687c3f955240ca2a576bdc3f742d4d915b6272d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: trigger: sysfs: fix use-after-free on remove
Ensure that the irq_work has completed before the trigger is freed.
================================================================== BUG: KASAN: use-after-free in irq_work_run_list Read of size 8 at addr 0000000064702248 by task python3/25
Call Trace: irq_work_run_list irq_work_tick update_process_times tick_sched_handle tick_sched_timer __hrtimer_run_queues hrtimer_interrupt
Allocated by task 25: kmem_cache_alloc_trace iio_sysfs_trig_add dev_attr_store sysfs_kf_write kernfs_fop_write_iter new_sync_write vfs_write ksys_write sys_write
Freed by task 25: kfree iio_sysfs_trig_remove dev_attr_store sysfs_kf_write kernfs_fop_write_iter new_sync_write vfs_write ksys_write sys_write
==================================================================
From the CVE record · Linux
The Linux kernel's IIO sysfs trigger removal can free a trigger before its pending irq_work completes. A local user able to add and remove these triggers through sysfs can trigger a use-after-free when that work runs; no further user interaction is described.
Engineers running Linux kernels with IIO sysfs triggers should check their kernel's advisory; affected versions are not specified.