CVE-2026-93829: smb: client: fix races in cifsd thread creation
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix races in cifsd thread creation
The cifsd demultiplex thread can run and access tcpses before the parent thread has finished populating tcpses, which the worker thread accesses locklessly.
Also, the kthreadrun macro may start the thread before returning the thread pointer. Because the pointer is part of the structure that the thread can access, if the kernel is preempted after the thread is spawned, but before the thread pointer is populated and the thread attempts to exit, it will sleep, waiting for a SIGKILL signal.
Fix this by moving creation of the thread to after all of tcpses'es fields are populated, and spawning the thread last, using a split kthreadcreate/wakeupprocess logic.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the CIFS client, populate all tcp_ses fields before creating the cifsd demultiplex thread; use split kthread_create/wake_up_process logic and wake the thread only after the thread pointer and tcp_ses are fully initialized.
Event History
Frequently Asked Questions
What timing conditions trigger the race?
The race occurs when the cifsd demultiplex thread runs before its parent has finished populating tcp_ses fields that the worker accesses without locking. A second race is possible because kthread_run can start the thread before returning and storing its thread pointer.
What can happen if the thread exits before its thread pointer is stored?
If the kernel is preempted after spawning the thread but before the thread pointer is populated, and the new thread attempts to exit, it can sleep while waiting for a SIGKILL signal.
How does the resolved change prevent these races?
The thread is created only after all tcp_ses fields have been populated. Startup is split into kthread_create and wake_up_process so the thread pointer can be stored before the thread is allowed to run.