CVE-2026-99527: spmi: Fix potential use-after-free by grabbing of_node reference
In the Linux kernel, the following vulnerability has been resolved:
spmi: Fix potential use-after-free by grabbing ofnode reference
As noticed by Sashiko during a review run of an unrelated patch, in ofspmiregisterdevices(), foreachavailablechildofnode() is used to loop through children, and to also assign a node to a newly created SPMI child device.
Problem is that the refcount is dropped at every iteration so, in the specific case of DT overlays, a use-after-free may occur when an overlay is dynamically unloaded!
To resolve this, increase the ofnode refcount when assigning (in function ofspmiregisterdevices) and release the reference in spmideviceremove().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2