spmi: Fix potential use-after-free by grabbing of_node reference

State
Published
Severity
Not Scored
Published
Nov 19, 2026
Updated
Nov 19, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

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().

ProductVersions
Linux Linuxbc32bbd0401170853b479645002df52f849f48fe to before b5e5d035abd1b49ecc9c85320fd6dfcc57ef9c79 Affectedbc32bbd0401170853b479645002df52f849f48fe to before 5653608781a660485d5e9be48a1d06025c4b97cf Affectedbc32bbd0401170853b479645002df52f849f48fe to before f7aa9de4f2b197cdd704cdc476901b68ee128433 Affected
Linux Linux6.14 Affectedbefore 6.14 Not Affected6.18.61 through 6.18.* Not Affected7.3.2 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.