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

CVE-2022-50659

CVE-2022-50659

Description

In the Linux kernel, the following vulnerability has been resolved:

hwrng: geode - Fix PCI device refcount leak

for_each_pci_dev() is implemented by pci_get_device(). The comment of pci_get_device() says that it will increase the reference count for the returned pci_dev and also decrease the reference count for the input pci_dev @from if it is not NULL.

If we break for_each_pci_dev() loop with pdev not NULL, we need to call pci_dev_put() to decrease the reference count. We add a new struct 'amd_geode_priv' to record pointer of the pci_dev and membase, and then add missing pci_dev_put() for the normal and error path.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

CVE-2022-50659 fixes a PCI device reference count leak in the Linux kernel's Geode hardware RNG driver that could lead to resource exhaustion.

Vulnerability

CVE-2022-50659 is a reference count leak in the Linux kernel's geode hardware random number generator (hwrng) driver. The driver uses for_each_pci_dev(), which internally calls pci_get_device(). This function increases the reference count of the returned pci_dev structure. When the loop breaks with a non-NULL pdev, the driver fails to call pci_dev_put() to decrement that reference count, leading to a leak. The fix introduces a new structure amd_geode_priv to track the PCI device pointer and memory base, ensuring pci_dev_put() is called in both normal and error paths. [1], [2], [3], [4]

Exploitation

An attacker would need local access to the system to trigger the driver's probe or removal paths repeatedly (e.g., via hotplug events or unbind/bind operations). No special privileges beyond local user access are required if the hardware is present, as the driver may be probed automatically. The root cause is a missing cleanup in the driver's error handling and teardown logic.

Impact

The leak causes the kernel's reference count for the PCI device to never reach zero, preventing proper release of the device's resources. Over time, this can lead to resource exhaustion, potentially causing denial-of-service conditions such as inability to allocate new PCI devices or memory. The issue is low severity (CVSS not provided but typically low) and affects systems with AMD Geode processors using the hardware RNG.

Mitigation

The fix was applied to the Linux kernel stable tree in commits [1], [2], [3], and [4]. Users should update to kernel versions containing these commits (e.g., 5.10.163, 5.15.88, 6.1.8, or later). No workaround is available; the patch must be applied.

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.