# CVE-2022-50868: hwrng: amd - Fix PCI device refcount leak

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **Published:** 2025-12-30T12:15:39.211Z
- **Modified:** 2026-06-17T05:24:19.437Z

## Who should check

- Anyone running Linux \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< f1c97f72ffd504f49882774e2ab689d982dc7afc; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 526c316948819d3ecd2bb20fe5e2580c51a1b760; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< e246f5eff26055bdcb61a2cc99c50af72a19680f; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 1199f8e02941b326c60ab71a63002b7c80e38212; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 5998e5c30e839f73e62cb29e0d9617b0d16ccba3; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 2b79a5e560779b35e1164d57ae35c48b43373082; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< cb348c7908631dd9f60083a0a1542eab055d3edf; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 2e10ecd012ae2b2a374b34f307e9bc1e6096c03d; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< ecadb5b0111ea19fc7c240bb25d424a94471eb7d
- Anyone running Linux 2.6.18

## Description

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

hwrng: amd - 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. Add the missing
pci\_dev\_put() for the normal and error path.

## Affected and fixed versions

- Linux: \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< f1c97f72ffd504f49882774e2ab689d982dc7afc; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 526c316948819d3ecd2bb20fe5e2580c51a1b760; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< e246f5eff26055bdcb61a2cc99c50af72a19680f; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 1199f8e02941b326c60ab71a63002b7c80e38212; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 5998e5c30e839f73e62cb29e0d9617b0d16ccba3; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 2b79a5e560779b35e1164d57ae35c48b43373082; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< cb348c7908631dd9f60083a0a1542eab055d3edf; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 2e10ecd012ae2b2a374b34f307e9bc1e6096c03d; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< ecadb5b0111ea19fc7c240bb25d424a94471eb7d (cvelist)
- Linux: 2.6.18 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50868. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50868.md
Affected: Linux >= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, < f1c97f72ffd504f49882774e2ab689d982dc7afc; >= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, < 526c316948819d3ecd2bb20fe5e2580c51a1b760; >= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, < e246f5eff26055bdcb61a2cc99c50af72a19680f; >= 96d63c0297ccfd6d9059c61…
Fixed in: Linux 526c316948819d3ecd2bb20fe5e2580c51a1b760, Linux 1199f8e02941b326c60ab71a63002b7c80e38212, Linux 5998e5c30e839f73e62cb29e0d9617b0d16ccba3, Linux 2b79a5e560779b35e1164d57ae35c48b43373082, Linux 2e10ecd012ae2b2a374b34f307e9bc1e6096c03d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50868 being exploited?

There is no confirmed exploitation: CVE-2022-50868 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50868?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50868?

Linux \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< f1c97f72ffd504f49882774e2ab689d982dc7afc; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 526c316948819d3ecd2bb20fe5e2580c51a1b760; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< e246f5eff26055bdcb61a2cc99c50af72a19680f; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 1199f8e02941b326c60ab71a63002b7c80e38212; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 5998e5c30e839f73e62cb29e0d9617b0d16ccba3; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 2b79a5e560779b35e1164d57ae35c48b43373082; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< cb348c7908631dd9f60083a0a1542eab055d3edf; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< 2e10ecd012ae2b2a374b34f307e9bc1e6096c03d; \>= 96d63c0297ccfd6d9059c614b3f5555d9441a2b3, \< ecadb5b0111ea19fc7c240bb25d424a94471eb7d; Linux 2.6.18.

### Is there a fix for CVE-2022-50868?

Yes. Fixed in Linux 526c316948819d3ecd2bb20fe5e2580c51a1b760, Linux 1199f8e02941b326c60ab71a63002b7c80e38212, Linux 5998e5c30e839f73e62cb29e0d9617b0d16ccba3, Linux 2b79a5e560779b35e1164d57ae35c48b43373082, Linux 2e10ecd012ae2b2a374b34f307e9bc1e6096c03d. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50868?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/f1c97f72ffd504f49882774e2ab689d982dc7afc>
- other: <https://git.kernel.org/stable/c/526c316948819d3ecd2bb20fe5e2580c51a1b760>
- other: <https://git.kernel.org/stable/c/e246f5eff26055bdcb61a2cc99c50af72a19680f>
- other: <https://git.kernel.org/stable/c/1199f8e02941b326c60ab71a63002b7c80e38212>
- other: <https://git.kernel.org/stable/c/5998e5c30e839f73e62cb29e0d9617b0d16ccba3>
- other: <https://git.kernel.org/stable/c/2b79a5e560779b35e1164d57ae35c48b43373082>
- other: <https://git.kernel.org/stable/c/cb348c7908631dd9f60083a0a1542eab055d3edf>
- other: <https://git.kernel.org/stable/c/2e10ecd012ae2b2a374b34f307e9bc1e6096c03d>
- other: <https://git.kernel.org/stable/c/ecadb5b0111ea19fc7c240bb25d424a94471eb7d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50868>

HTML: <https://flawdb.com/CVE-2022-50868> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50868>
