CVE-2026-97925: tick/broadcast: Plug clockevents replacement race
In the Linux kernel, the following vulnerability has been resolved:
tick/broadcast: Plug clockevents replacement race
朱恺乾 reported and decoded the following race condition when a broadcast device is replaced:
CPUA CPUB tickbroadcastoneshotcontrol() bc = tickbroadcastdevice.evtdev; tickinstallbroadcastdevice(dev) clockeventsexchangedevice(cur, dev) shutdown(cur); detach(cur); cur->handler = noop; tickbroadcastdevice.evtdev = dev;
tickbroadcastsetevent(bc, nextevent); <- FAIL: arms a detached device.
If the original broadcast device has a restricted interrupt affinity mask and the last CPU in that mask goes offline then the BUG() in tickcleanupdeadcpu() triggers because the clockevent device is not in detached state.
The reason for this is that tickinstallbroadcastdevice() is not serialized vs. tick broadcast operations.
The obvious cure is to serialize tickinstallbroadcastdevice() with tickbroadcastlock against a concurrent tick broadcast operation.
That requires to split clockeventsexchangedevice() into two parts, one which does the exchange, shutdown and detach operation and the other which drops the module reference count. This is required because the module reference cannot be dropped while holding tickbroadcastlock.
Let clockeventsexchangedevice() do both operations as before, but let the broadcast device code take the two step approach and do the device exchange under tickbroadcastlock and drop the module reference count after releasing it.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for this issue to trigger?
A broadcast clockevent device must be replaced concurrently with a tick broadcast operation. The failure scenario described also requires the original broadcast device to have a restricted interrupt-affinity mask and for the last CPU in that mask to go offline.
What symptom may indicate that a system has hit this race?
The kernel can trigger the BUG() in tick_cleanup_dead_cpu() because the original clockevent device is no longer detached when the last CPU in its interrupt-affinity mask goes offline.