wifi: rsi: fix kthread lifetime race between self-exit and external-stop
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4c62764d0fc21a34ffc44eec1210038c3a2e4473 · < 4f9a4ae8d2c198f01611ea376034c326ef43ab56| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: rsi: fix kthread lifetime race between self-exit and external-stop
RSI driver use both self-exit(kthread_complete_and_exit) and external-stop (kthread_stop) when killing a kthread. Generally, kthread_stop() is called first, and in this case, no particular issues occur.
However, in rare instances where kthread_complete_and_exit() is called first and then kthread_stop() is called, a UAF occurs because the kthread object, which has already exited and been freed, is accessed again.
Therefore, to prevent this with minimal modification, you must remove kthread_stop() and change the code to wait until the self-exit operation is completed.
From the CVE record · Linux
The Linux kernel’s RSI Wi-Fi driver has a thread-lifetime race. If a thread exits itself before an external stop is attempted, the stop can access the freed thread object. The input does not establish an attack path, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with the RSI Wi-Fi driver should check their kernel versions against the vendor advisory; affected versions are not specified.