CVE-2025-39744: rcu: Fix rcu_read_unlock() deadloop due to IRQ work
In the Linux kernel, the following vulnerability has been resolved:
rcu: Fix rcureadunlock() deadloop due to IRQ work
During rcureadunlockspecial(), if this happens during irqexit(), we can lockup if an IPI is issued. This is because the IPI itself triggers the irqexit() path causing a recursive lock up.
This is precisely what Xiongfeng found when invoking a BPF program on the tracetickstop() tracepoint As shown in the trace below. Fix by managing the irqwork state correctly.
irqexit() irqexitrcu() / inhardirq() returns false after this / preemptcountsub(HARDIRQOFFSET) tickirqexit() ticknohzirqexit() ticknohzstopschedtick() tracetickstop() / a bpf prog is hooked on this trace point / bpftracetickstop() bpftracerun2() rcureadunlockspecial() / will send a IPI to itself / irqworkqueueon(&rdp->deferqsiw, rdp->cpu);
A simple reproducer can also be obtained by doing the following in tickirqexit(). It will hang on boot without the patch:
static inline void tickirqexit(void) { + rcureadlock(); + WRITEONCE(current->rcureadunlockspecial.b.needqs, true); + rcureadunlock(); +
[neeraj: Apply Frederic's suggested fix for PREEMPTRT]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.104.2-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-39744?
CVE-2025-39744 has a high severity rating due to the potential for deadlock situations in the Linux kernel.
How do I fix CVE-2025-39744?
To mitigate CVE-2025-39744, update the Linux kernel to the latest patched version released by the maintainers.
What are the risks associated with CVE-2025-39744?
The risks of CVE-2025-39744 include system hang or freeze due to deadlock during IRQ handling.
Which versions of the Linux kernel are affected by CVE-2025-39744?
CVE-2025-39744 affects various versions of the Linux kernel prior to the official fix being applied.
Is CVE-2025-39744 a remote exploit?
CVE-2025-39744 is not a remote exploit, but it can be triggered by local processes interacting with IRQs.