VYPR
Unrated severityNVD Advisory· Published Dec 30, 2025· Updated Apr 15, 2026

CVE-2022-50887

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

1

Patches

9

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.