HIGH Introduced in 7.1
smp CsdLock Race
CVE-2026-68438
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: smp: Make CSD lock acquisition atomic for debug mode Commit b0473dcd4b1d ("smp: Improve smp_call_function_single() CSD-lock diagnostics") changed smp_call_function_single() so that, when CSD lock debugging is enabled, async !wait calls use the destination CPU csd_data. That improves diagnostics, but it also removes the single-writer property that made the old csd_lock() safe: multiple CPUs can now prepare the same destination CPU CSD concurrently. csd_lock() currently waits for CSD_FLAG_LOCK to clear and then sets the bit with a non-atomic read-modify-write. Two senders can both see an unlocked CSD, set the bit, overwrite the callback fields, and enqueue the same llist node. Re-adding a node that is already the queue head can make node->next point to itself, leaving the target CPU stuck walking call_single_queue. Later synchronous work, such as a TLB shootdown, can then remain queued and trigger soft-lockup warnings or panics. Keep the single csd_lock() implementation, but when CSD lock debugging is enabled, acquire CSD_FLAG_LOCK with try_cmpxchg_acquire(). This makes the destination CPU CSD a real atomic lock in the only configuration where it can be shared by multiple remote senders, while preserving the existing non-debug fast path.
02KernelScan AI Analysis
Risk summary
A race condition in the kernel's SMP inter-processor interrupt (IPI) infrastructure can cause a target CPU to become stuck in an infinite loop, leading to soft-lockup warnings or a kernel panic. The bug only manifests when CSD lock debug mode is enabled, which is a non-default debug configuration. Any local unprivileged process can trigger the race through normal kernel operations such as memory management.
Vulnerability analysis
When a special debug mode is enabled, the kernel uses a shared per-CPU slot for asynchronous cross-CPU messages. The slot is guarded by a flag that is checked and set in two separate steps, so two sending CPUs can both see the slot as free, both write into it, and both add the same entry to the target's work list. This can make the list entry point to itself, trapping the target CPU in an endless loop and stalling later critical work such as memory shootdowns, which leads to soft lockups or a panic. The fix turns the check-and-set into a single atomic operation, but only when the debug mode that shares the slot is active; the normal non-debug path is unchanged. Any local process can trigger the underlying cross-CPU messages through ordinary system calls, but the vulnerable shared-slot path is active only on kernels built with that debug option enabled.
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.1 | 7.1 | 7.1.6 | 282d220bae5f |
| mainline | 7.1 | 7.2-rc5 | 35551efb155e |