Executive brief
A vulnerability in the Linux kernel's timekeeping system can cause system instability or crashes on specialized Real-Time (PREEMPT_RT) systems. The issue occurs when the system attempts to verify clock synchronization across different processors while in a state that does not allow certain background tasks to run. This can lead to a kernel panic or "hang," potentially disrupting critical operations that rely on high-precision timing.
Technical details
A deadlock or invalid context bug exists in the Linux kernel's clocksource verification logic when running on PREEMPT_RT kernels. The function clocksource_verify_choose_cpus() was being invoked with preemption disabled (atomic context), but it calls get_random_u32(), which may attempt to acquire sleeping locks (batched_entropy_32 or base_crng.lock) in the random driver. This violation of atomic context constraints triggers a kernel BUG. The fix replaces preempt_disable() with migrate_disable() during the CPU selection phase to ensure smp_processor_id() remains stable without entering a full atomic state that forbids sleeping locks. Patch availability is confirmed across multiple stable kernel branches.
Affected products
- Linux Linux Kernel 5.10.50 to 5.10.235, 5.12.17 to 5.13, 5.13.2 to 5.15.179, 5.16 to 6.1.129, 6.2 to 6.6.79, 6.7 to 6.12.16, 6.13 to 6.13.4
Timeline
- 2025-01-31: other: Patch submitted by developer
- 2025-02-27: disclosed: CVE published
References
- https://git.kernel.org/stable/c/0fb534187d2355f6c8f995321e76d1ccd1262ac1
- https://git.kernel.org/stable/c/60f54f0d4ea530950549a8263e6fdd70a40490a4
- https://git.kernel.org/stable/c/6bb05a33337b2c842373857b63de5c9bf1ae2a09
- https://git.kernel.org/stable/c/852805b6cbdb69c298a8fc9fbe79994c95106e04
- https://git.kernel.org/stable/c/8783ceeee797d9aa9cfe150690fb9d0bac8cc459
- https://git.kernel.org/stable/c/cc3d79e7c806cb57d71c28a4a35e7d7fb3265faa
- https://git.kernel.org/stable/c/d9c217fadfcff7a8df58567517d1e4253f3fd243