sched_ext: Fix possible deadlock in the deferred_irq_workfn()
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 |
|
|
6.12.686.17.126.18In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Fix possible deadlock in the deferred_irq_workfn()
For PREEMPT_RT=y kernels, the deferred_irq_workfn() is executed in the per-cpu irq_work/* task context and not disable-irq, if the rq returned by container_of() is current CPU's rq, the following scenarios may occur:
lock(&rq->__lock); <Interrupt> lock(&rq->__lock);
This commit use IRQ_WORK_INIT_HARD() to replace init_irq_work() to initialize rq->scx.deferred_irq_work, make the deferred_irq_workfn() is always invoked in hard-irq context.
From the CVE record · Linux
The Linux kernel's sched_ext deferred IRQ work can deadlock on kernels built with PREEMPT_RT=y when it tries to lock the current CPU's run queue and an interrupt tries to take the same lock. The input does not describe an attacker-controlled trigger or specify network access, authentication, or user interaction requirements.
Engineers running Linux kernels with PREEMPT_RT=y should check whether their kernel includes this fix; affected versions are not specified.