CVE-2022-50887
Description
In the Linux kernel, the following vulnerability has been resolved:
regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
I got the the following report:
OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /i2c/pmic@62/regulators/exten
In of_get_regulator(), the node is returned from of_parse_phandle() with refcount incremented, after using it, of_node_put() need be called.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A refcount leak in Linux kernel's regulator_dev_lookup() causes memory leak when parsing device tree regulator nodes.
Vulnerability
In the Linux kernel's regulator subsystem, the function regulator_dev_lookup() fails to decrement the reference count of a device tree node after using it. The node is obtained via of_parse_phandle(), which increments the reference count, but the corresponding of_node_put() is missing, leading to an unbalanced refcount [1].
Exploitation
This bug is triggered during regulator lookup when the kernel parses device tree overlays that define regulator nodes. No special privileges are required; it can be triggered by loading a device tree overlay that references a regulator, which is a common operation in embedded systems and during hotplug events.
Impact
The refcount leak causes a memory leak of the device node structure. Over time, repeated overlay loading or regulator lookups can exhaust kernel memory, leading to system instability or denial of service. The kernel error message "OF: ERROR: memory leak, expected refcount 1 instead of 2" is reported when the leak is detected.
Mitigation
The fix has been applied to the Linux kernel stable branches. Patches are available in commits such as f2b41b748c19962b82709d9f23c6b2b0ce9d2f91 and others [1][2][3][4]. Users should update their kernel to a version containing the fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
90e88505ac0a64dfcf5087db93ac888db0f67d39937f8de64f48c474efe05cda1895f3b7f2b93c58adddd2f98469c3141f2b41b748c19Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- git.kernel.org/stable/c/0e88505ac0a6ae97746bcdbd4b042ee9f20455aenvd
- git.kernel.org/stable/c/2b93c58adddd98812ad928bbc2063038f3df1ffdnvd
- git.kernel.org/stable/c/2f98469c3141f8e42ba11075a273fb795bbad57fnvd
- git.kernel.org/stable/c/3ac888db0f67813d91373a9a61c840f815cd4ec9nvd
- git.kernel.org/stable/c/4dfcf5087db9a34a300d6b99009232d4537c3e6anvd
- git.kernel.org/stable/c/cda1895f3b7f324ece1614308a815a3994983b97nvd
- git.kernel.org/stable/c/d39937f8de641c44a337cec4a2e5d3e8add20a7dnvd
- git.kernel.org/stable/c/f2b41b748c19962b82709d9f23c6b2b0ce9d2f91nvd
- git.kernel.org/stable/c/f48c474efe05cf9ce5e535b5e0ddd710e963936cnvd
News mentions
0No linked articles in our index yet.