firmware: arm_scmi: Avoid IDR updates while cleaning channels
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 05a2801d8b90c1b5159618d4bd3a3c65d60f3ff1 · < c38b1e19485aaa820e52cfe162525a8af67563da| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
firmware: arm_scmi: Avoid IDR updates while cleaning channels
scmi_cleanup_channels() walks the TX/RX channel IDRs with idr_for_each() to free transport resources and destroy the dedicated transport devices before calling idr_destroy().
The destroy callback removed each entry from the same IDR being walked. That is not needed for this cleanup path, and it is unsafe because idr_for_each() has not advanced its radix-tree iterator while the callback is running. Removing the current entry from the callback can invalidate the iterator state. The callback also cannot be protected by rcu_read_lock(), because scmi_device_destroy() may sleep.
Leave IDR teardown to the following idr_destroy() call and keep the callback limited to device destruction.
From the CVE record · Linux
The Linux kernel’s ARM SCMI channel cleanup can invalidate an IDR iterator when a destroy callback removes an entry being traversed. The input does not identify an attacker action or specify network access, authentication, or user-interaction conditions.
Engineers running Linux kernels with ARM SCMI support should check their installations; affected versions are not specified.