firmware: arm_scmi: Fix requested device removal race
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d3cd7c525fd2ecce3a6c963f314969a54783d211 · < 2c4097e6c4aed276c5e9ec2ab331ab397ea780bf| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
firmware: arm_scmi: Fix requested device removal race
scmi_protocol_device_unrequest() drops scmi_requested_devices_mtx while notifying listeners but continues to retain the per-protocol list head. When two SCMI drivers for the same protocol unregister concurrently, one thread can remove the final request and free the list head while the other is running its notifier. The latter then dereferences the freed list head after reacquiring the mutex and can free it a second time.
Complete the list and IDR updates, including freeing an empty list head, before dropping the mutex. Keep the blocking notifier outside the critical section and retain only the detached request across the callback.
From the CVE record · Linux
The Linux kernel’s ARM SCMI device removal code has a race when two SCMI drivers for the same protocol unregister concurrently. One thread can free a list head while the other still uses it, causing a use-after-free and possible double-free. The described condition involves concurrent driver unregistration; the input does not establish a remote attack path or user interaction.
Engineers running Linux kernels with ARM SCMI support should check whether their kernel includes the fix; affected versions are not specified.