spmi: Fix potential use-after-free by grabbing of_node reference
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| LinuxLinux | — | Not listed |
| LinuxKernel |
≥ 6.14.0, < 6.18.61→ 6.18.61 ≥ 6.19.0, < 7.3.2→ 7.3.2 |
6.18.61 7.3.2 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2026-99527 linux-lts Fix available
- Debian DEBIAN-CVE-2026-99527 linux Fix available
- Ubuntu UBUNTU-CVE-2026-99527 linux-vmware, linux-starfive-6.5, linux-starfive-6.2 +118 more No fixed version in this record
Original description The description as published by the source.
In the Linux kernel, the following vulnerability has been resolved:
spmi: Fix potential use-after-free by grabbing of_node reference
As noticed by Sashiko during a review run of an unrelated patch,
in of_spmi_register_devices(), for_each_available_child_of_node()
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 of_node refcount when assigning (in
function of_spmi_register_devices) and release the reference in
spmi_device_remove().
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package git.kernel.org
- REDHAT Red Hat
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web github.com